From e13a610ad42ef4d5d0222a2a942682d35e405dc7 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Wed, 7 Dec 2011 00:57:52 +0200 Subject: The test runner will print out encountered exceptions --- lib/pure/unittest.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index e2906dd1a..f9981195c 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -70,6 +70,10 @@ template test*(name: expr, body: stmt): stmt = TestSetupIMPL() body + except: + checkpoint("Unhandled exception: " & getCurrentExceptionMsg()) + fail() + finally: TestTeardownIMPL() testDone name, TestStatusIMPL -- cgit 1.4.1-2-gfad0