summary refs log tree commit diff stats
path: root/tests/exception/tsetexceptions.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exception/tsetexceptions.nim')
-rw-r--r--tests/exception/tsetexceptions.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/exception/tsetexceptions.nim b/tests/exception/tsetexceptions.nim
index 557fc1898..386a6ae4c 100644
--- a/tests/exception/tsetexceptions.nim
+++ b/tests/exception/tsetexceptions.nim
@@ -6,3 +6,10 @@ let ex = newException(CatchableError, "test")
 setCurrentException(ex)
 doAssert getCurrentException().msg == ex.msg
 doAssert getCurrentExceptionMsg() == ex.msg
+setCurrentException(nil)
+
+try:
+  raise newException(CatchableError, "test2")
+except:
+  setCurrentException(nil)
+doAssert getCurrentException() == nil
n105' href='#n105'>105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151