Custom default exception handler?

Sean Kelly sean at invisibleduck.org
Wed Feb 12 13:05:26 PST 2014


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.


More information about the Digitalmars-d-learn mailing list