CBMC
invalid_source_file_exceptiont Class Reference

Thrown when we can't handle something in an input source file. More...

#include <exception_utils.h>

+ Inheritance diagram for invalid_source_file_exceptiont:
+ Collaboration diagram for invalid_source_file_exceptiont:

Public Member Functions

 invalid_source_file_exceptiont (std::string reason, source_locationt source_location)
 
std::string what () const override
 A human readable description of what went wrong. More...
 
const std::string & get_reason () const
 
const source_locationtget_source_location () const
 
- Public Member Functions inherited from invalid_input_exceptiont
 invalid_input_exceptiont (std::string reason)
 
- Public Member Functions inherited from cprover_exception_baset
virtual ~cprover_exception_baset ()=default
 
virtual ~cprover_exception_baset ()=default
 

Private Attributes

source_locationt source_location
 

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 we can't handle something in an input source file.

For example, if we get C source code that is not syntactically valid or that has type errors.

Definition at line 171 of file exception_utils.h.

Constructor & Destructor Documentation

◆ invalid_source_file_exceptiont()

invalid_source_file_exceptiont::invalid_source_file_exceptiont ( std::string  reason,
source_locationt  source_location 
)

Definition at line 88 of file exception_utils.cpp.

Member Function Documentation

◆ get_reason()

const std::string& invalid_source_file_exceptiont::get_reason ( ) const
inline

Definition at line 179 of file exception_utils.h.

◆ get_source_location()

const source_locationt& invalid_source_file_exceptiont::get_source_location ( ) const
inline

Definition at line 184 of file exception_utils.h.

◆ what()

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

Member Data Documentation

◆ source_location

source_locationt invalid_source_file_exceptiont::source_location
private

Definition at line 190 of file exception_utils.h.


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