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.