February 20, 2018
I'm piecewise migrating one of my old C++ projects to D, and one of the major issues right now is exception handling.

What's the state of C++ exception support right now?  Is it safe for a D function (called from C++ code) to throw an exception, and have the stack unwind through the C++ call stack and caught by D code at the bottom of the stack?  Or will it potentially interact badly with the C++ part of the call stack?  I'm guessing C++ dtors may not get called, etc.?

Conversely, is it safe for C++ code to throw an exception that unwinds through D functions in the call stack, and caught by a C++ catch block?


T

-- 
Elegant or ugly code as well as fine or rude sentences have something in common: they don't depend on the language. -- Luca De Vitis