[D-runtime] Chaining Errors

Sean Kelly sean at invisibleduck.org
Mon Jan 24 10:31:55 PST 2011

Only because they're all thrown automatically by the runtime, and that code has never needed to do any chaining.  The optional argument should probably be added.

On Jan 22, 2011, at 3:17 AM, Jonathan M Davis wrote:

> Throwable is chainable. Exception is chainable. Error is chainable. They all 
> take an option Throwable argument in at least one of their constructors. 
> Typically, all classes derived from Exception do the same. However, for some 
> reason, none of the classes in core.exception which are derived from Error take 
> a Throwable argument. Is there a particular reason for this? I'm inclined to add 
> a default null Throwable to their constructors just like pretty much every other 
> Throwable has. But I figured that I should enquire as to whether there was a good 
> reason that I can't think of why none of the Error classes in core.exception 
> take an optional Throwable.
> - Jonathan M Davis
> _______________________________________________
> D-runtime mailing list
> D-runtime at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/d-runtime

More information about the D-runtime mailing list