Error and Exception chaining

Yuxuan Shui via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 12 14:08:49 PST 2016


Thanks a lot for the explanation!

On Monday, 12 December 2016 at 22:01:54 UTC, Ali Çehreli wrote:
> (Note: Looks like there is a bug regarding 
> Error.bypassedException member. Would others please confirm.)
>
> On 12/12/2016 01:15 PM, Yuxuan Shui wrote:
> > [...]
> that Error
> > [...]
> vague, and I'm
> > [...]
>
> You're referring to "[Errors] bypass the normal chaining 
> mechanism, such that the chain can only be caught by catching 
> the first Error." What it means is that an Error cannot be a 
> collateral of an Exception, hiding in its chain. So, when there 
> is an Error that would otherwise be a collateral of an 
> Exception, you cannot catch the original Exception. What is 
> more importantly in-flight at that time is the Error.
>

But chaining Error to Error works just like chaining Exception to 
Exception?

>
> But bypassedException member of Error is always null. Bug?

Did I just randomly found a bug?

>
> Thank you,
> Ali



More information about the Digitalmars-d-learn mailing list