Sharg 1.1.2-rc.1
The argument parser for bio-c++ tools.
Loading...
Searching...
No Matches
sharg::parser_error Class Reference

Parser exception that is thrown whenever there is an error while parsing the command line arguments. More...

#include <sharg/exceptions.hpp>

+ Inheritance diagram for sharg::parser_error:

Public Member Functions

 parser_error (std::string const &s)
 The constructor.
 
- Public Member Functions inherited from std::runtime_error
T runtime_error (T... args)
 
T what (T... args)
 

Detailed Description

Parser exception that is thrown whenever there is an error while parsing the command line arguments.

Errors caught by the parser:

  • Unknown option/flag (not specified by developer but set by user)
  • Too many positional options
  • Too few positional options
  • Option that was declared as required (option_spec::required) was not set
  • Option is not a list but specified multiple times
  • Type conversion failed
  • Validation failed (as defined by the developer)
Remarks
For a complete overview, take a look at Parser

This entity is stable. Since version 1.0.

Constructor & Destructor Documentation

◆ parser_error()

sharg::parser_error::parser_error ( std::string const & s)
inline

The constructor.

Parameters
[in]sThe error message.

This entity is stable. Since version 1.0.


The documentation for this class was generated from the following file:
Hide me