Exception chaining and collectException
Nemanja Boric via Digitalmars-d
digitalmars-d at puremagic.com
Sat Aug 19 13:58:51 PDT 2017
On Friday, 18 August 2017 at 22:51:35 UTC, Walter Bright wrote:
> On 8/18/2017 5:07 AM, Steven Schveighoffer wrote:
>> If we are to remove them, what happens when exceptions would
>> normally chain?
>
> In C++, throwing an exception while unwinding is a fatal error.
>
Well, you still can throw it, but you're not allowed to let it
escape the destructor (you need to catch them before they would
chain).
C++ also provides a way to inspect if you're in the middle of the
stack unwinding caused by an exception, to make this a bit more
controllable, and I would think we should provide the similar
primitive:
http://en.cppreference.com/w/cpp/error/uncaught_exception.
More information about the Digitalmars-d
mailing list