Top-level exception class. More...

#include <exception.h>

+ Inheritance diagram for clan::Exception:

Public Member Functions

 Exception (const std::string &message)
 Constructs an exception object.
 
 ~Exception () noexcept override
 Destructs an exception object.
 
std::string get_message_and_stack_trace () const
 Returns the message and call stack present when the exception object was created, formatted using newlines.
 
std::vector< std::string > get_stack_trace () const
 Returns the call stack present when the exception object was created.
 
const char * what () const override throw ()
 Returns description of exception.
 

Public Attributes

std::string message
 Description of exception.
 

Detailed Description

Top-level exception class.

Constructor & Destructor Documentation

◆ Exception()

clan::Exception::Exception ( const std::string & message)

Constructs an exception object.

References message.

Referenced by clan::JsonException::JsonException(), and clan::XPathException::XPathException().

◆ ~Exception()

clan::Exception::~Exception ( )
inlineoverridenoexcept

Destructs an exception object.

Member Function Documentation

◆ get_message_and_stack_trace()

std::string clan::Exception::get_message_and_stack_trace ( ) const

Returns the message and call stack present when the exception object was created, formatted using newlines.

On Linux, to obtain function names, remember to link with the -rdynamic flag

References get_message_and_stack_trace().

Referenced by get_message_and_stack_trace().

◆ get_stack_trace()

std::vector< std::string > clan::Exception::get_stack_trace ( ) const

Returns the call stack present when the exception object was created.

On Linux, to obtain function names, remember to link with the -rdynamic flag

References get_stack_trace().

Referenced by get_stack_trace().

◆ what()

const char * clan::Exception::what ( ) const
throw ( )
override

Returns description of exception.

Member Data Documentation

◆ message


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