catch any exception appending output

HTML output can have javascript with errors, etc.

No output should ever raise, no matter what.

closes #3620
Merge pull request #3621 from minrk/htmlerror

catch any exception appending output

HTML output can have javascript with errors, etc.

No output should ever raise, no matter what.

closes #3620