parent
52e276c82d
commit
916d0c21af
2 changed files with 18 additions and 4 deletions
17
tests/exception/t18620.nim
Normal file
17
tests/exception/t18620.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
discard """
|
||||
matrix: "--gc:arc; --gc:refc"
|
||||
"""
|
||||
|
||||
proc hello() =
|
||||
raise newException(ValueError, "You are wrong")
|
||||
|
||||
var flag = false
|
||||
|
||||
try:
|
||||
hello()
|
||||
except ValueError as e:
|
||||
flag = true
|
||||
doAssert len(getStackTraceEntries(e)) > 0
|
||||
doAssert len(getStackTraceEntries(e)) > 0
|
||||
|
||||
doAssert flag
|
||||
Loading…
Add table
Add a link
Reference in a new issue