ADOL-C: Automatic Differentiation in C/C++ 2.7.3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ADOLCError::ADOLCError Class Reference

Run-time error with a message and source location. More...

#include <adolcerror.h>

Inheritance diagram for ADOLCError::ADOLCError:
Inheritance graph
[legend]
Collaboration diagram for ADOLCError::ADOLCError:
Collaboration graph
[legend]

Public Member Functions

 ADOLCError (std::string_view message, const source_location &info)
 Constructs an ADOLCError with message and source location.
 
const source_location & where () const noexcept
 Access the captured source location.
 

Static Public Member Functions

static constexpr source_location makeSourceLocation (std::string_view file, std::string_view func, int line)
 
static std::string makeMessage (std::string_view message, const source_location &info)
 

Detailed Description

Run-time error with a message and source location.

what() returns the formatted message; where() returns the location.

Constructor & Destructor Documentation

◆ ADOLCError()

ADOLCError::ADOLCError::ADOLCError ( std::string_view  message,
const source_location &  info 
)
inline

Constructs an ADOLCError with message and source location.

Parameters
messageError description (will be stored as std::string)
infoSource location

Member Function Documentation

◆ makeMessage()

static std::string ADOLCError::ADOLCError::makeMessage ( std::string_view  message,
const source_location &  info 
)
inlinestatic

◆ makeSourceLocation()

static constexpr source_location ADOLCError::ADOLCError::makeSourceLocation ( std::string_view  file,
std::string_view  func,
int  line 
)
inlinestaticconstexpr

◆ where()

const source_location & ADOLCError::ADOLCError::where ( ) const
inlinenoexcept

Access the captured source location.

Returns
Const reference to the source_location object

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