Show user an error message on uncaught exceptions

Addresses #623