CBMC
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
 
virtual ~cprover_exception_baset ()=default
 

Private Attributes

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...
 

Additional Inherited Members

- Protected Member Functions inherited from cprover_exception_baset
 cprover_exception_baset (std::string reason)
 This constructor is marked protected to ensure this class isn't used directly. More...
 
 cprover_exception_baset (std::string reason)
 This constructor is marked protected to ensure this class isn't used directly. More...
 
- Protected Attributes inherited from cprover_exception_baset
std::string reason
 The reason this exception was generated. 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 50 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 31 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.

Reimplemented from cprover_exception_baset.

Definition at line 17 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 56 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 54 of file exception_utils.h.


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