Boost C++ Libraries

...one 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 for the latest Boost documentation.
PrevUpHomeNext

Class validation_error

boost::program_options::validation_error

Synopsis

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


class validation_error :
  public boost::program_options::error_with_option_name
{
public:

  enum kind_t { multiple_values_not_allowed = = 30, 
                at_least_one_value_required, invalid_bool_value, 
                invalid_option_value, invalid_option };
  // construct/copy/destruct
  validation_error(kind_t, const std::string & = "", const std::string & = "", 
                   int = 0);
  ~validation_error();

  // public member functions
  kind_t kind() const;

  // protected member functions
  std::string get_template(kind_t);
};

Description

Class thrown when value of option is incorrect.

validation_error public construct/copy/destruct

  1. validation_error(kind_t kind, const std::string & option_name = "", 
                     const std::string & original_token = "", 
                     int option_style = 0);
  2. ~validation_error();

validation_error public member functions

  1. kind_t kind() const;

validation_error protected member functions

  1. std::string get_template(kind_t kind);

    Used to convert kind_t to a related error text


PrevUpHomeNext