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

Content added Content deleted
(Added uBasic/4tH version)
Line 3,202: Line 3,202:
If x = u ' catch U0
If x = u ' catch U0
If Try(_bar(x)) Then ' try to execute bar
If Try(_bar(x)) Then ' try to execute bar
Print "Function foo caught exception U0"
Print "Procedure foo caught exception U0"
EndIf ' catch exception and write msg
EndIf ' catch exception and write msg
Else ' don't catch other exceptions
Else ' don't catch other exceptions
Line 3,223: Line 3,223:


Q Exception raised, 16092559880829058:136</pre>
Q Exception raised, 16092559880829058:136</pre>

=={{header|Ursala}}==
=={{header|Ursala}}==
Foo calls bar, and bar calls baz. Normal termination of bar is bypassed
Foo calls bar, and bar calls baz. Normal termination of bar is bypassed