diff options
Diffstat (limited to 'tests/exception/tfinally3.nim')
-rw-r--r-- | tests/exception/tfinally3.nim | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/exception/tfinally3.nim b/tests/exception/tfinally3.nim index 8bccd1a7f..9053d397d 100644 --- a/tests/exception/tfinally3.nim +++ b/tests/exception/tfinally3.nim @@ -1,6 +1,9 @@ discard """ - file: "tfinally3.nim" - output: "false" + outputsub: ''' +false +Within finally->try +''' + exitCode: 1 """ # Test break in try statement: @@ -14,5 +17,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() |