void Chusov::Exceptions::rethrow_if_nested | ( | E && | e | ) |
Implements a behaviour of the standard std::rethrow_if_nested function checking if the most derived dynamic type of the specified exception inherits the nested_exception class and, if that is true, throws an exception stored by the nested_exception object calling nested_exception::rethrow_nested(). If an exception object given by the parameter is not dynamically connected with the nested_exception class through inheritance, the function does nothing. .
E | is a type of an exception given by the parameter. |
e | is a universal reference to an exception to rethrow. |
Together with throw_with_nested function and with nested_exception class the function implements a behaviour of the standard C++11 nested exceptions mechanism as defined by the std::rethrow_if_nested, std::throw_with_nested functions and by the std::nested_exception class respectively.