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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -