summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/unittest.nim4
1 files changed, 4 insertions, 0 deletions
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