Error and Exception chaining

Yuxuan Shui via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 12 16:33:58 PST 2016


On Monday, 12 December 2016 at 22:35:22 UTC, Yuxuan Shui wrote:
> On Monday, 12 December 2016 at 22:13:59 UTC, Ali Çehreli wrote:
>> On 12/12/2016 02:08 PM, Yuxuan Shui wrote:
>> > [...]
>> wrote:
>> >> [...]
>> Error.bypassedException
>> >> [...]
>> mechanism,
>> >> [...]
>> Error."
>> >> [...]
>> Exception,
>> >> [...]
>> otherwise
>> >> [...]
>> original
>> >> [...]
>> is the Error.
>> > [...]
>> Exception to
>> > [...]
>>
>> Currently yes. Now this line in my versatile :o) program:
>>
>>             if (n >= errorIndex) {
>>
>> Two Errors are chained:
>>
>> Caught
>> TestError: 3
>>  TestError: 4
>>
>> However, there is the following ongoing thread claiming that 
>> it was a wrong decision:
>>
>>   http://forum.dlang.org/post/o2n347$2i1g$1@digitalmars.com
>>
>> > [...]
>>
>> From what I could graps from that much of documentation, yes, 
>> it seems to be a bug.
>
> I did some testing and bypassedException is null in 2.072.1, 
> but is not null in 2.070.2
>
>>
>> Ali

The unwind process seem to stop one level too early, causing 
language_specific_data to be different, causing 
__dmd_personality_v0 to not chain exception into .bypassException.


More information about the Digitalmars-d-learn mailing list