Exceptions/Catch an exception thrown in a nested call: Difference between revisions

Added 11l
(Added Rust)
(Added 11l)
Line 15:
Show/describe what happens when the program is run.
<br><br>
 
=={{header|11l}}==
{{trans|Python}}
<lang 11l>T U0 {}
T U1 {}
 
F baz(i)
I i == 0
X U0()
E
X U1()
 
F bar(i)
baz(i)
 
F foo()
L(i) 0..1
X.try
bar(i)
X.catch U0
print(‘Function foo caught exception U0’)
 
foo()</lang>
 
=={{header|Ada}}==
Line 108 ⟶ 131:
 
=={{header|ALGOL 68}}==
{{trans|pythonPython}}
 
{{works with|ALGOL 68|Standard - no extensions to language used}}
1,480

edits