mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
* 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
15 lines
237 B
Nim
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()
|