Custom default exception handler?

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Tue Feb 11 17:07:24 PST 2014


On 2/11/2014 6:35 PM, Sean Kelly wrote:
> Throw a static exception (maybe even derived directly from Throwable),
> similar to OutOfMemory, with a custom toString.  That should eliminate
> the formatting you don't like and will prevent the trace from occurring
> as well (see rt/deh.d in Druntime--the trace isn't run if you throw
> typeid(t).init.ptr).

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?



More information about the Digitalmars-d-learn mailing list