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

m
Line 993:
</pre>
=={{header|Elena}}==
ELENA 45.10 :
<lang elena>import extensions;
class U0 : Exception;
{
constructor new()
<= new();
}
class U1 : Exception;
{
constructor new()
<= new();
}
singleton Exceptions
Line 1,011 ⟶ 1,019:
if (i == 0)
{
U0.new().raise()
}
else
{
U1.new().raise()
}
}
Line 1,027 ⟶ 1,035:
self.bar()
}
catch:(U0 e)
{
console.printLine("U0 Caught")
Anonymous user