diff options
Diffstat (limited to 'tests/exception/texcsub.nim')
-rw-r--r-- | tests/exception/texcsub.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/exception/texcsub.nim b/tests/exception/texcsub.nim new file mode 100644 index 000000000..463e95613 --- /dev/null +++ b/tests/exception/texcsub.nim @@ -0,0 +1,13 @@ +discard """ + output: "caught!" +""" +# Test inheritance for exception matching: + +try: + raise newException(OSError, "dummy message") +except Exception: + echo "caught!" +except: + echo "wtf!?" + +#OUT caught! |