Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Class error_with_no_option_name



// In header: <boost/program_options/errors.hpp>

class error_with_no_option_name :
  public boost::program_options::error_with_option_name
  // construct/copy/destruct
  error_with_no_option_name(const std::string &, const std::string & = "");

  // public member functions
  void set_option_name(const std::string &);


Base class of unparsable options, when the desired option cannot be identified.

It makes no sense to have an option name, when we can't match an option to the parameter

Having this a part of the error_with_option_name hierachy makes error handling a lot easier, even if the name indicates some sort of conceptual dissonance!

error_with_no_option_name public construct/copy/destruct

  1. error_with_no_option_name(const std::string & template_, 
                              const std::string & original_token = "");
  2. ~error_with_no_option_name();

error_with_no_option_name public member functions

  1. void set_option_name(const std::string &);

    Does NOT set option name, because no option name makes sense