Together with throw_with_nested and rethrow_if_nested implements a behaviour of the standard C++11 nested exceptions mechanism as defined by the std::nested_exception class and by the std::throw_with_nested and std::rethrow_if_nested functions respectively. . More...
#include <chsvexception.h>
Public Member Functions | |
nested_exception () noexcept | |
Default constructor using the std::current_exception function to retrieve the current exception having been caught by the caller. Thus, the objects supposed to be default-created in a catch context, or the std::bad_exception will be nested otherwise. | |
nested_exception (const nested_exception &other) noexcept=default | |
Default copy constructor. | |
nested_exception & | operator= (const nested_exception &other) noexcept=default |
Default copy assign operator. | |
virtual | ~nested_exception ()=default |
Destructor. | |
void | rethrow_nested () const |
Rethrows the stored exception. If there is no stored exceptions (i.e. nested_ptr returns null pointer), then std::terminate is called. | |
std::exception_ptr | nested_ptr () const noexcept |
Returns a pointer to the stored exception, if any. | |
Together with throw_with_nested and rethrow_if_nested implements a behaviour of the standard C++11 nested exceptions mechanism as defined by the std::nested_exception class and by the std::throw_with_nested and std::rethrow_if_nested functions respectively. .