VM exception fixes (#11868)
This commit is contained in:
parent
a906b3952b
commit
50e921bb94
3 changed files with 28 additions and 2 deletions
14
tests/vm/texception.nim
Normal file
14
tests/vm/texception.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
proc someFunc() =
|
||||
try:
|
||||
raise newException(ValueError, "message")
|
||||
except ValueError as err:
|
||||
doAssert err.name == "ValueError"
|
||||
doAssert err.msg == "message"
|
||||
raise
|
||||
|
||||
static:
|
||||
try:
|
||||
someFunc()
|
||||
except:
|
||||
discard
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue