Better handling of uncaught exceptions thrown inside a controller