If an uncaught exception happens, exit.