Any libunwind experts n da house?

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 24 10:44:24 PDT 2014


On 9/24/14, 9:05 AM, Sean Kelly wrote:
> On Wednesday, 24 September 2014 at 15:07:05 UTC, Andrei Alexandrescu wrote:
>> On 9/24/14, 5:12 AM, Iain Buclaw via Digitalmars-d wrote:
>>>>
>>>> Is there plans to catching C++ exceptions in D?
>>>
>>> I'd say no to such an idea.
>>
>> I understand the difficulty of it. However, we should look into it
>> closely. Preventing D code from catching C++ exceptions forces one to
>> implement the driver/event loop/etc in C++, which is quite unpleasant.
>> It essentially takes C++ compatibility a few good notches down.
>
> If C++ code can execute D delegates, perhaps an intermediate step would
> be to create a wrapper in C++ that calls the delegate wrapped in an
> appropriate try/catch block.  Syntax would be a bit weird as you'd have
> to specify a callback for each exception type you wanted to catch, but
> it seems doable.

That's a good idea, thanks. -- Andrei


More information about the Digitalmars-d mailing list