Files
Nim/tests/effects/teffects7.nim
LemonBoy 3ce6b2acb9 Fix exception tracking in try blocks (#10455)
Exceptions raised inside a nkFinally/nkExcept block are not caught by
the block itself.

Fixes #3886
2019-01-27 10:32:44 +01:00

15 lines
253 B
Nim

discard """
errormsg: "can raise an unlisted exception: ref FloatingPointError"
line: 10
"""
proc foo() {.raises: [].} =
try:
discard
except KeyError:
raise newException(FloatingPointError, "foo")
except Exception:
discard
foo()