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

Content added Content deleted
m (syntax highlighting fixup automation)
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 if _err["msg"] == .U0["msg"] {
catch {
writeln "caught .U0 in .foo()"
if _err["msg"] == .U0["msg"] {
} else {
writeln "caught .U0 in .foo()"
throw
} else {
}
throw
}
}
}
}
}
}