
Merrill Cornish wrote: [...]
}//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.
You are catching the exception by value. That will slice the derived object, and lose the exception info. Catch by reference instead and you might see something more useful. HTH, Ian McCulloch