Refactor untrapped exception reporting code
Merge pull request #73 from hashdist/pr-31

Refactor untrapped exception reporting code (closes #31)