C++/D interface: exceptions
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Fri Sep 12 09:19:54 PDT 2014
Am Fri, 12 Sep 2014 15:55:37 +0000
schrieb "Sean Kelly" <sean at invisibleduck.org>:
> On Friday, 12 September 2014 at 06:56:29 UTC, Jacob Carlborg
> wrote:
> > On 64bit Objective-C can catch C++ exceptions. But I don't
> > think you can do anything with the exception, i.e. it uses the
> > following catch syntax:
> >
> > @catch(...) {}
> >
> > Would that be easier?
>
> I think the trick is setting up the stack frame in such a way
> that the C++ exception mechanism knows there's a catch block
> available at all. From there, we should be able to use the
> standard interface-to-class method to call virtual functions on
> the exception object, and hopefully the C++ runtime will handle
> cleanup for us.
What exception object?
throw "bad things happened";
--
Marco
More information about the Digitalmars-d
mailing list