mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
21 lines
408 B
Nim
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")
|