During tests, stop event loop in case of uncaught exception