Exceptions/Catch an exception thrown in a nested call: Difference between revisions
Content added Content deleted
(→{{header|Visual Basic .NET}}: Added VB.NET) |
Langurmonkey (talk | contribs) |
||
Line 1,847: | Line 1,847: | ||
val .bar = f(.i) .baz(.i) |
val .bar = f(.i) .baz(.i) |
||
val .foo = f( |
val .foo = f() { |
||
for .i in [0, 1] { |
|||
.bar(.i) |
|||
catch if .err["msg"] == .U0["msg"] { |
|||
writeln "caught .U0 in .foo()" |
|||
⚫ | |||
} else { |
|||
throw |
|||
⚫ | |||
} |
} |
||
} |
} |
||
.foo( |
.foo()</lang> |
||
.foo(1)</lang> |
|||
{{out}} |
{{out}} |