Catching and reporting fatal errors.
Merge pull request #359 from spekary/bugfix-ErrorReporting

Catching and reporting fatal errors.