Detecting exception unwinding

Ola Fosheim Grøstad via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 3 03:47:35 PST 2016


On Wednesday, 3 February 2016 at 11:41:28 UTC, Jonathan M Davis 
wrote:
> AFAIK, there is no way to detect whether an exception is in 
> flight or not aside from the cases where scope(failure) or 
> catch would catch the exception, and from what I recall of the 
> last time that someone asked this question, the consensus was 
> that it couldn't be done - but maybe I'm remembering 
> incorrectly. I am pretty sure that this was asked within the 
> last few months though, so if you search D.Learn, you can 
> probably find that discussion.

:-/

I am looking for something like this:

http://en.cppreference.com/w/cpp/error/uncaught_exception

It is useful for certain types of libraries where you want to 
cancel out effects "undo commits" when exceptional situations 
arise.




More information about the Digitalmars-d-learn mailing list