c++ exceptions, can what() be NULL? -
Can any time () be taped in the std :: exception?
Is E.Vot () being checked downwards?
// ...} hold (const std :: exception & e) {std :: string error; If (E. (he ()) error = e.what (); }
The content of the string is defined as executing, so I think the answer is yes.
Edit: Not so standard says: virtual const char * what () const throw (); 5 Returns: An implementation-defined NTBS
so it must return the string, not just an indicator and a string NULL
. As others have pointed out that getting an exception is easy, whose returns
back NULL
, but I'm not sure these things should be in line with standards . Of course, if you are implementing () in your own exception class, then I will consider it very bad behavior that it will allow it to return.
More:
Another question is whether the what ()
faucet, and such exciting issues back Please, please see
Comments
Post a Comment