diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-07-13 04:43:53 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-07-13 04:43:53 +0200 |
commit | 0c271f54208c7ba0bac6ad2da87f60e7c6d8e37c (patch) | |
tree | ae815a17059d4292f95e0c524a920e20619ec27e /tests | |
parent | 03e0aa37e3d41c77475a2484e9a3d084e26bd8bf (diff) | |
download | Nim-0c271f54208c7ba0bac6ad2da87f60e7c6d8e37c.tar.gz |
fixes #5871
Diffstat (limited to 'tests')
-rw-r--r-- | tests/exception/tfinally3.nim | 17 |
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() |