scope(failure) - Programming in D, doesn't catch throw. When should scope (failure) be used?
Paul Backus
snarwin at gmail.com
Wed Nov 26 20:02:52 UTC 2025
On Wednesday, 26 November 2025 at 18:42:16 UTC, Brother Bill
wrote:
> In Linux workstation, the expanded example from Programming in
> D, bottom of page 206 crashed. Is this expected behavior? I
> would have expected that the scope(failure) would catch the
> throw and continue the program.
`scope(failure)` rethrows the exception after executing. This is
intentional and expected.
More information about the Digitalmars-d-learn
mailing list