D exceptions and calling c++ code

J noname at notavailable.notavailabe.com
Fri Mar 29 22:06:31 PDT 2013


Is there anything that would prevent D from catching C++ 
exceptions?

It would be nice to be able to leverage C++ libraries, but if you 
can't catch C++ exceptions, I'm not sure how realistic that is.

That doesn't mean that catch() in D has to be the catcher.

If there was some way to indicate that a function call was into a 
C++ library, and perhaps some way to auto-generate, at the call 
point, the boilerplate that does the "catch this C++ exception 
and re-throw it as a D exception" translation, that would be 
awesome.

Possible?


More information about the Digitalmars-d mailing list