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 a snapshot of the master branch, built from commit 9dd661613c.

Class validation_error



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

class validation_error :
  public boost::program_options::error_with_option_name

  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);

  // public member functions
  kind_t kind() const;

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


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);

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