Refs #17.

Fixed a segfault caused by uncaught exceptions in overloaded `exit()` functions.