
Hi, I would like to know the name of the option that causes the command line parsing to fail. I don't like the idea of having to parse the what() string to extract the option name. I think the exception classes should be extended with functions to get this information. This is useful if you want to control the appearance of the error messages. E.g. use another language than English. In short I would like to do something like this: try { ... } catch ( const po::multiple_occurrences& e) { std::cerr << "multiple occurrences of option " << e.option_name(); } catch ( const po::unknown_option& e ) { std::cerr << "unknown option " << e.option_name(); } catch ( const po::invalid_syntax& e ) { std::cerr << e.what()); } catch ( const po::error& e ) { std::cerr << e.what()); } /Peter