Custom default exception handler?

Sean Kelly sean at invisibleduck.org
Tue Feb 11 18:33:53 PST 2014


On Wednesday, 12 February 2014 at 01:07:31 UTC, Nick Sabalausky 
wrote:
>
> Oh, interesting. Is this something that can be relied on 
> long-term? Ie, is a static non-Exception Throwable deliberately 
> *supposed* to not include a stack trace, or is it potentially 
> more of a currently-missing feature?

It's intentional, and was done to serve two purposes.  The first 
was to provide some way for throwing OutOfMemory to not 
accidentally try to allocate, and the second was because if you 
throw the same static instance in two threads simultaneously, the 
trace would end up invalid for one of them.  The only safe thing 
to do is not trace at all.


More information about the Digitalmars-d-learn mailing list