Exception handled in main loop.