cprover
invalid_command_line_argument_exceptiont Class Reference

Thrown when users pass incorrect command line arguments, for example passing no files to analysis or setting two mutually exclusive flags. More...

#include <exception_utils.h>

+ Inheritance diagram for invalid_command_line_argument_exceptiont:
+ Collaboration diagram for invalid_command_line_argument_exceptiont:

Public Member Functions

 invalid_command_line_argument_exceptiont (std::string reason, std::string option, std::string correct_input="")
 
std::string what () const override
 A human readable description of what went wrong. More...
 
- Public Member Functions inherited from cprover_exception_baset
virtual ~cprover_exception_baset ()=default
 

Private Attributes

std::string reason
 The reason this exception was generated. More...
 
std::string option
 The full command line option (not the argument) that got erroneous input. More...
 
std::string correct_input
 In case we have samples of correct input to the option. More...
 

Detailed Description

Thrown when users pass incorrect command line arguments, for example passing no files to analysis or setting two mutually exclusive flags.

Definition at line 37 of file exception_utils.h.

Constructor & Destructor Documentation

◆ invalid_command_line_argument_exceptiont()

invalid_command_line_argument_exceptiont::invalid_command_line_argument_exceptiont ( std::string  reason,
std::string  option,
std::string  correct_input = "" 
)

Definition at line 26 of file exception_utils.cpp.

Member Function Documentation

◆ what()

std::string invalid_command_line_argument_exceptiont::what ( ) const
overridevirtual

A human readable description of what went wrong.

For readability, implementors should not add a leading or trailing newline to this description.

Implements cprover_exception_baset.

Definition at line 12 of file exception_utils.cpp.

Member Data Documentation

◆ correct_input

std::string invalid_command_line_argument_exceptiont::correct_input
private

In case we have samples of correct input to the option.

Definition at line 45 of file exception_utils.h.

◆ option

std::string invalid_command_line_argument_exceptiont::option
private

The full command line option (not the argument) that got erroneous input.

Definition at line 43 of file exception_utils.h.

◆ reason

std::string invalid_command_line_argument_exceptiont::reason
private

The reason this exception was generated.

Definition at line 40 of file exception_utils.h.


The documentation for this class was generated from the following files: