Files
Nim/tests/effects/teffects7.nim
Andreas Rumpf 03c146cd93 do not track 'raise Defect' in the .raises: [] clause anymore (#14298)
* do not track 'raise Defect' in the .raises: [] clause anymore

* --panics:on maps 'raise Defect' to an unrecoverable fatal error

* make tests green again

* update the documentation too
2020-05-11 16:25:56 +02:00

15 lines
237 B
Nim

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