summary refs log tree commit diff stats
path: root/tests/exception/tfinally3.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-07-13 04:48:22 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-07-13 04:48:22 +0200
commit2b862b74e0b0b7b4a18f4262356289fb921eaf0c (patch)
tree8f41b7355f6d791d6485e8225d6a5cb2f80ca7d6 /tests/exception/tfinally3.nim
parenta5695c13afabac6e67ff677d564b6d1a6aeb1af4 (diff)
parent0c271f54208c7ba0bac6ad2da87f60e7c6d8e37c (diff)
downloadNim-2b862b74e0b0b7b4a18f4262356289fb921eaf0c.tar.gz
Merge branch 'devel' into araq
Diffstat (limited to 'tests/exception/tfinally3.nim')
-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()