Don't crash if there is an exception in a handler not initiated by an
user