Catching C++ Exceptions in D

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 5 15:56:43 PST 2016


On 1/5/2016 1:30 PM, Jakob Ovrum wrote:
> On Tuesday, 5 January 2016 at 17:23:38 UTC, Walter Bright wrote:
>> At the exit of a catch clause, the destructor on the caught C++ exception will
>> be run, as would be expected by C++ programmers.
>
> Does this work with rethrow? What if a D exception is thrown from a C++ catch
> block - will the C++ exception still be destroyed properly?
>

My understanding is that rethrow invokes the copy constructor, so the original 
can still be destroyed.


More information about the Digitalmars-d mailing list