Install error handler for uncaught exceptions as well as fatal errors

- Testing environment does not make use of these