mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
Exceptions raised inside a nkFinally/nkExcept block are not caught by the block itself. Fixes #3886
15 lines
253 B
Nim
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()
|