Files
Nim/tests/exception/tnestedreturn2.nim
Adam Strzelecki e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00

21 lines
424 B
Nim

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