Anonymous user
Exceptions/Catch an exception thrown in a nested call: Difference between revisions
Exceptions/Catch an exception thrown in a nested call (view source)
Revision as of 11:59, 27 April 2021
, 3 years ago→{{header|Dyalect}}
m (→{{header|Phix}}: added syntax colouring the hard way, phix/basics) |
|||
Line 852:
=={{header|Dyalect}}==
<lang dyalect>
func baz() {
bazCallCount += 1
if bazCallCount == 1 {
throw
} else if bazCallCount == 2 {
throw
}
}
func bar() {
baz()
}
func foo() {
var calls = 2
Line 875 ⟶ 873:
bar()
} catch {
}
calls -= 1
}
}
}</lang>▼
{{out}}
<pre>
Runtime exception Dy601:
Stack trace: ...</pre>
|