summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-07-13 04:43:53 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-07-20 18:42:08 +0200
commitebba9f06ae3074255830128ecb599fb22a3310ef (patch)
tree980eaee3f481d94ffaf03a54cb33525b982b287d /tests
parentec9de2e3cd34d32ed5674814cbee53e203246894 (diff)
downloadNim-ebba9f06ae3074255830128ecb599fb22a3310ef.tar.gz
fixes #5871
Diffstat (limited to 'tests')
-rw-r--r--tests/exception/tfinally3.nim17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/exception/tfinally3.nim b/tests/exception/tfinally3.nim
index 8bccd1a7f..037ca9553 100644
--- a/tests/exception/tfinally3.nim
+++ b/tests/exception/tfinally3.nim
@@ -1,6 +1,11 @@
 discard """
   file: "tfinally3.nim"
-  output: "false"
+  output: '''false
+Within finally->try
+Traceback (most recent call last)
+tfinally3.nim(24)        tfinally3
+Error: unhandled exception: First [Exception]'''
+  exitCode: 1
 """
 # Test break in try statement:
 
@@ -14,5 +19,11 @@ proc main: bool =
 
 echo main() #OUT false
 
-
-
+# bug #5871
+try:
+  raise newException(Exception, "First")
+finally:
+  try:
+    raise newException(Exception, "Within finally->try")
+  except:
+    echo getCurrentExceptionMsg()