blob: 6098672a22a62c85fb04eb9cbebfb347e3e698df (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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()
|