On Wednesday, 12 February 2014 at 02:41:34 UTC, Nick Sabalausky
wrote:
On 2/11/2014 6:35 PM, Sean Kelly wrote:
Throw a static exception (maybe even derived directly from
Throwable),
I assume then that throwing something directly derived from
Throwable would still run cleanup code (like scope guards and
finally) like throwing Exception would? Or is it like throwing
an Error, skipping cleanup code?
Everything runs cleanup code right now, unless someone changed
things on me. But if a change were made, I'd say that only Error
and its children would skip cleanup. The default would be to
perform cleanup. That lets users create their own exception
hierarchies.