Files
Nim/tests/exception/tnestedreturn2.nim
2014-02-23 00:20:16 +01:00

21 lines
408 B
Nim

discard """
file: "tnestedreturn.nim"
outputsub: "Error: unhandled exception: Problem [EOS]"
exitcode: "1"
"""
proc test4() =
try:
try:
raise newException(EOS, "Problem")
except EOS:
return
finally:
discard
# Should cause unhandled exception error,
# but could cause segmentation fault if
# exceptions are not handled properly.
test4()
raise newException(EOS, "Problem")