Exception thrown when the input string cannot be parsed to the needed type for an argument.  
 More...
#include <parse_exception.h>
|  | 
|  | TypeParseException (const std::string &message, const std::string &input, const std::type_info &targetType) | 
|  | Construct a TypeParseException with a message, input string, and target type. 
 | 
|  | 
|  | TypeParseException (const std::string &input, const std::type_info &targetType) | 
|  | Construct a TypeParseException with default message, input string, and target type. 
 | 
|  | 
| const std::string & | getInput () const noexcept | 
|  | Gets the input string that failed to parse. 
 | 
|  | 
| const std::type_info & | getTargetType () const noexcept | 
|  | Gets the target type that the input couldn't be parsed to. 
 | 
|  | 
Exception thrown when the input string cannot be parsed to the needed type for an argument. 
◆ TypeParseException() [1/2]
  
  | 
        
          | cli::parsing::TypeParseException::TypeParseException | ( | const std::string & | message, |  
          |  |  | const std::string & | input, |  
          |  |  | const std::type_info & | targetType |  
          |  | ) |  |  |  | inline | 
 
Construct a TypeParseException with a message, input string, and target type. 
- Parameters
- 
  
    | message | The error message |  | input | The input string that couldn't be parsed |  | targetType | The type it couldn't be parsed to |  
 
 
 
◆ TypeParseException() [2/2]
  
  | 
        
          | cli::parsing::TypeParseException::TypeParseException | ( | const std::string & | input, |  
          |  |  | const std::type_info & | targetType |  
          |  | ) |  |  |  | inline | 
 
Construct a TypeParseException with default message, input string, and target type. 
- Parameters
- 
  
    | input | The input string that couldn't be parsed |  | targetType | The type it couldn't be parsed to |  
 
 
 
◆ getInput()
  
  | 
        
          | const std::string & cli::parsing::TypeParseException::getInput | ( |  | ) | const |  | inlinenoexcept | 
 
Gets the input string that failed to parse. 
- Returns
- the input string 
 
 
◆ getTargetType()
  
  | 
        
          | const std::type_info & cli::parsing::TypeParseException::getTargetType | ( |  | ) | const |  | inlinenoexcept | 
 
Gets the target type that the input couldn't be parsed to. 
- Returns
- reference to the target type info 
 
 
The documentation for this class was generated from the following file: