cprover
incorrect_goto_program_exceptiont Class Reference

Thrown when a goto program that's being processed is in an invalid format, for example passing the wrong number of arguments to functions. More...

#include <exception_utils.h>

+ Inheritance diagram for incorrect_goto_program_exceptiont:
+ Collaboration diagram for incorrect_goto_program_exceptiont:

Public Member Functions

 incorrect_goto_program_exceptiont (std::string message)
 
template<typename Diagnostic , typename... Diagnostics>
 incorrect_goto_program_exceptiont (std::string message, Diagnostic &&diagnostic, Diagnostics &&... diagnostics)
 
template<typename... Diagnostics>
 incorrect_goto_program_exceptiont (std::string message, source_locationt source_location, Diagnostics &&... diagnostics)
 
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 message
 
source_locationt source_location
 
std::string diagnostics
 

Detailed Description

Thrown when a goto program that's being processed is in an invalid format, for example passing the wrong number of arguments to functions.

Note that this only applies to goto programs that are user provided, that internal transformations on goto programs don't produce invalid programs should be guarded by invariants instead.

See also
invariant.h

Definition at line 89 of file exception_utils.h.

Constructor & Destructor Documentation

◆ incorrect_goto_program_exceptiont() [1/3]

incorrect_goto_program_exceptiont::incorrect_goto_program_exceptiont ( std::string  message)
explicit

Definition at line 57 of file exception_utils.cpp.

◆ incorrect_goto_program_exceptiont() [2/3]

template<typename Diagnostic , typename... Diagnostics>
incorrect_goto_program_exceptiont::incorrect_goto_program_exceptiont ( std::string  message,
Diagnostic &&  diagnostic,
Diagnostics &&...  diagnostics 
)

Definition at line 116 of file exception_utils.h.

◆ incorrect_goto_program_exceptiont() [3/3]

template<typename... Diagnostics>
incorrect_goto_program_exceptiont::incorrect_goto_program_exceptiont ( std::string  message,
source_locationt  source_location,
Diagnostics &&...  diagnostics 
)

Definition at line 129 of file exception_utils.h.

Member Function Documentation

◆ what()

std::string incorrect_goto_program_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 64 of file exception_utils.cpp.

Member Data Documentation

◆ diagnostics

std::string incorrect_goto_program_exceptiont::diagnostics
private

Definition at line 112 of file exception_utils.h.

◆ message

std::string incorrect_goto_program_exceptiont::message
private

Definition at line 109 of file exception_utils.h.

◆ source_location

source_locationt incorrect_goto_program_exceptiont::source_location
private

Definition at line 110 of file exception_utils.h.


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