Files
Nim/tests/exception/tfinally3.nim
2017-07-20 23:33:41 +02:00

27 lines
430 B
Nim

discard """
file: "tfinally3.nim"
outputsub: '''false
Within finally->try'''
exitCode: 1
"""
# Test break in try statement:
proc main: bool =
while true:
try:
return true
finally:
break
return false
echo main() #OUT false
# bug #5871
try:
raise newException(Exception, "First")
finally:
try:
raise newException(Exception, "Within finally->try")
except:
echo getCurrentExceptionMsg()