Fix bug #175 (make it possible to ctrl-c out of infinite loop caused by exceptions raised in exception handlers)