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
This commit is contained in:
parent
517dd800f8
commit
03c146cd93
6 changed files with 74 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
|||
discard """
|
||||
errormsg: "can raise an unlisted exception: ref FloatingPointDefect"
|
||||
errormsg: "can raise an unlisted exception: ref ValueError"
|
||||
line: 10
|
||||
"""
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ proc foo() {.raises: [].} =
|
|||
try:
|
||||
discard
|
||||
except KeyError:
|
||||
raise newException(FloatingPointDefect, "foo")
|
||||
raise newException(ValueError, "foo")
|
||||
except Exception:
|
||||
discard
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue