dimanche 2 avril 2017

Why to use throw in the definition of a method?

I am trying to implement a new exception for our code base and I came across this post in SO:

http://ift.tt/2nOauWf

but I am not sure why the what method is defined as follow:

virtual const char* what() const throw (){
    return msg_.c_str();
}

What is the meaning of throw in this context?

Aucun commentaire:

Enregistrer un commentaire