Exceptions/Catch an exception thrown in a nested call: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Langurmonkey (talk | contribs) m (→{{header|langur}}: added curly braces to catch for clarity) |
||
Line 1,973: | Line 1,973: | ||
for .i in [0, 1] { |
for .i in [0, 1] { |
||
.bar(.i) |
.bar(.i) |
||
catch |
catch { |
||
if _err["msg"] == .U0["msg"] { |
|||
writeln "caught .U0 in .foo()" |
|||
} else { |
|||
throw |
|||
} |
|||
} |
|||
} |
} |
||
} |
} |