C++: Why doesn't what() throw an exception? -
in std::exception
class , derived classes there virtual function called what()
doesn't throw exception. why doesn't what()
throw exception?
what()
method allows string (error message) associated exception:
see reference documentation std::exception::what()
it should not throw exceptions design.
if want throw exception in c++ go with:
throw std::exception("we going die");
Comments
Post a Comment