diff options
Diffstat (limited to 'tests/run/texceptions.nim')
-rw-r--r-- | tests/run/texceptions.nim | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/tests/run/texceptions.nim b/tests/run/texceptions.nim deleted file mode 100644 index 69b2d0f6a..000000000 --- a/tests/run/texceptions.nim +++ /dev/null @@ -1,66 +0,0 @@ -discard """ - output: ''' -BEFORE -FINALLY - -BEFORE -EXCEPT -FINALLY -RECOVER - -BEFORE -EXCEPT -FINALLY -''' -""" - -echo "" - -proc no_expcetion = - try: - echo "BEFORE" - - except: - echo "EXCEPT" - raise - - finally: - echo "FINALLY" - -try: no_expcetion() -except: echo "RECOVER" - -echo "" - -proc reraise_in_except = - try: - echo "BEFORE" - raise newException(EIO, "") - - except EIO: - echo "EXCEPT" - raise - - finally: - echo "FINALLY" - -try: reraise_in_except() -except: echo "RECOVER" - -echo "" - -proc return_in_except = - try: - echo "BEFORE" - raise newException(EIO, "") - - except: - echo "EXCEPT" - return - - finally: - echo "FINALLY" - -try: return_in_except() -except: echo "RECOVER" - |