-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Multi-exception destructors, or MED for short, is an idea where, rather than calling std::terminate when a destructor terminates, simply allocate the memory for the new exception and continue propagation. Now if the exception from the destructor or the thrown exception can be a valid catch. Once we reach a valid catch block, we stop exception propagation.
It may also be useful for the catching exception to check to see if a particular exception was thrown along with the caught type. We could investigate what is needed to provide a function like so:
template<typename T>
std::optional<T&> get_additional_thrown_exception(T&);Assuming we get std::optional<T&> in the standard, with this, you either get a reference to the thrown object that follows that type OR you get nullopt.
Metadata
Metadata
Assignees
Labels
No labels