diff options
Diffstat (limited to 'tests/exception/twrongexc.nim')
-rw-r--r-- | tests/exception/twrongexc.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/exception/twrongexc.nim b/tests/exception/twrongexc.nim new file mode 100644 index 000000000..d229c5749 --- /dev/null +++ b/tests/exception/twrongexc.nim @@ -0,0 +1,8 @@ +discard """ + outputsub: "Error: unhandled exception: [ValueError]" + exitcode: "1" +""" +try: + raise newException(ValueError, "") +except OverflowDefect: + echo("Error caught") |