Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
C++ and Beyond 2012: Andrei Alexandrescu - Systematic Error Handling in C++
Dec 13, 2012 at 5:06 PMYes, it based on top of platform-specific implementation of uncaught_exception_count.
However, I made it work on all platforms I have access to - MSVC, GCC, Clang ( see full list at github readme ).
And I think it should be easy to implement it on other platforms, because info about current exceptions in flight should be stored somewhere.
By the way, at 1:18:10 Andrei mentioned that he would accept GCC only solution.
C++ and Beyond 2012: Andrei Alexandrescu - Systematic Error Handling in C++
Dec 12, 2012 at 6:18 PMI have implemented scope(failure) and scope(success) in C++. https://github.com/panaseleus/stack_unwinding
I.e. ScopeGuard without need to call .dismiss() manually.
For example:
try { int some_var=1; // some_var is just for example of capturing, // but not requirement cout << "Case #1: stack unwinding" << endl; scope(exit) { cout << "exit " << some_var << endl; ++some_var; }; scope(failure) { cout << "failure " << some_var << endl; ++some_var; }; scope(success) { cout << "success " << some_var << endl; ++some_var; }; throw 1; } catch(int){}