Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions | Friends
exception::CommonException Class Reference

Basic exception from which all other exceptions are derived. More...

#include <CommonException.h>

Inheritance diagram for exception::CommonException:
[legend]
Collaboration diagram for exception::CommonException:
[legend]

Public Member Functions

 CommonException (std::string cause)
 Exception constructor with specified cause. The backtrace is internally computed and the command line is also retrieved from global data registry. More...
 
const char * what () const noexcept override
 
const std::string & getCause () const
 
const std::string & getBacktrace () const
 
const std::string & getCommand () const
 

Friends

std::ostream & operator<< (std::ostream &os, const CommonException &)
 

Detailed Description

Basic exception from which all other exceptions are derived.

Extends standard exception and additionally contains cause, backtrace (if conputed), and copy of command line string used to execute the program.

Constructor & Destructor Documentation

◆ CommonException()

exception::CommonException::CommonException ( std::string  cause)
explicit

Exception constructor with specified cause. The backtrace is internally computed and the command line is also retrieved from global data registry.

Here is the call graph for this function:

Member Function Documentation

◆ getBacktrace()

const std::string & exception::CommonException::getBacktrace ( ) const
Returns
reason why the exception occurred

◆ getCause()

const std::string & exception::CommonException::getCause ( ) const
Returns
reason why the exception occurred

◆ getCommand()

const std::string & exception::CommonException::getCommand ( ) const
Returns
reason why the exception occurred

◆ what()

const char * exception::CommonException::what ( ) const
overridenoexcept
Returns
reason why the exception occurred

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const CommonException data 
)
friend

Print this object as raw representation to ostream.

Parameters
osostream where to print
instanceobject to print
Returns
modified output stream

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