Initial pass at handling uncaught exceptions in tests.