Catch uncaught exceptions executing handlers