Comparing Exceptions and Errors
frame
frame86 at live.com
Tue Jun 7 16:28:13 UTC 2022
On Friday, 3 June 2022 at 23:40:50 UTC, Steven Schveighoffer
wrote:
> During the last beerconf, I wrote a short blog post about how
> `Error` and `Exception` are different, and why you should never
> continue after catching `Error`s.
I know the thematics but I still wonder why we only have
`scope(failure)` then? Anywhere where you will use this shiny
thing with a return statement will also catch any error that have
occurred. `scope(exit)` doesn't allow return statements, thus the
only properly clean design would be an additional
`scope(exception)` guard.
More information about the Digitalmars-d-learn
mailing list