...
If the copy constructor for the exception object type throws during the copy initialization, std::terminate()
is called, which can result in undefined behavior. For more information on implicitly calling std::terminate()
, see ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit()abruptly terminate the program.
The copy constructor for an object thrown as an exception must be declared noexcept
, including any implicitly-defined copy constructors. Note, any function declared noexcept
that terminates by throwing an exception does not conform to ERR55-CPP. Honor exception specifications.
...