Generic extensible exception mixin. More...

#include <senf/Utils/Exception.hh>

Inheritance diagram for senf::ExceptionMixin:

Public Member Functions

std::string message () const
 get exception description More...
 
std::string backtrace () const
 Return backtrace (if available) More...
 
void append (std::string text)
 Extend exception description. More...
 

Protected Member Functions

 ExceptionMixin (std::string const &description="")
 Initialize exception with string. More...
 

Protected Attributes

std::string what_
 

Detailed Description

Generic extensible exception mixin.

ExceptionMixin is a generic exception mixin which allows the exception to be later extended by catching and re-throwing it (See example in Exception classes).

Definition at line 129 of file Exception.hh.

Constructor & Destructor Documentation

◆ ExceptionMixin()

senf::ExceptionMixin::ExceptionMixin ( std::string const &  description = "")
explicitprotected

Initialize exception with string.

description is the initial error description string. This should probably be a string constant describing the exception for most derived exceptions.

Member Function Documentation

◆ append()

void senf::ExceptionMixin::append ( std::string  text)

Extend exception description.

Adds text to the description text.

◆ backtrace()

std::string senf::ExceptionMixin::backtrace ( ) const

Return backtrace (if available)

◆ message()

std::string senf::ExceptionMixin::message ( ) const

get exception description

Member Data Documentation

◆ what_

std::string senf::ExceptionMixin::what_
protected

Definition at line 145 of file Exception.hh.


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