Refactor out HtmlMessageException 

refs #6564 use meaningful exceptions instead