Boost logo

Boost Users :

From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2005-11-21 14:41:01


Merrill Cornish wrote:
<snip>

>}//try
>catch(std::exception e) {
> cerr << "Exception:" << endl;
> cerr << e.what() << endl;
> exit(EXIT_FAILURE);
>}//catch
>catch(...) {
> cerr << "An unknown exception occurs while parsing :
> "command line arguments." << endl;
> exit(EXIT_FAILURE);
>}//catch
>
>
>Using the 'try' in the position shown above, if I input an unexpected command
>line options, an exceptioin is thrown whose what() method returns "St9exception".
>That's it. Just "St9exception". I can't find that string in the Boost source anywhere.
>
>
In libstdc++ the default messages for standard exception classes are
their "mangled" symbol names, and St9exception is the mangled name for
std::exception. The reason you're seeing that is that you're catching
the exception by value, not reference.

Ben.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net