Hi:

The standard approach to subclassing from std::exception seems to be to override the virtual what() & provide your own storage for the returned error message. However, I've found that I can also get the functionality I want by using the std::exception ctor that takes a string to set the error message & then I don't need to override what(). This seems to me to be preferable, so I'm wondering why this isn't the standard approach to subclassing std::exception. Is there a pitfall to this approach that I'm missing?

Thanks in advance!