4 ms·
Something like std::nested_exception [0]? [0] https://en.cppreference.com/w/cpp/error/nested_exception https://en.cppreference.com/w/cpp/error/nested_exception
by bregma 4y ago
Something like std::nested_exception [0]?
[0] https://en.cppreference.com/w/cpp/error/nested_exception https://en.cppreference.com/w/cpp/error/nested_exception
- kentonv 4y agoSort of, but nested_exception covers a different scenario. With nested_exception, the "attachment" is an exception which caused the exception it is attached to. In the scenario I'm talking about, the "attachment" is an exception which was caused by the exception it is attached to. Anyway, the key missing thing is not so much the exception representation, but the ability to have custom handling of what to do when an exception is thrown during unwind. Today, it goes straight to std::terminate(). You can customize the terminate handler, but it is required to end the process.