SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Private Attributes | List of all members
SoDa::SoDaException Class Reference

The SoDa Exception class. More...

#include <SoDaBase.hxx>

Public Member Functions

 SoDaException (const std::string &_reason, SoDaBase *obj=NULL)
 The constructor. More...
 
 SoDaException (const char *_reason, SoDaBase *obj)
 The constructor. More...
 
std::string toString ()
 Create a string that explains this exception. More...
 
const char * what ()
 Create a string that explains this exception. More...
 

Private Attributes

SoDaBasethrower
 who caused the exception, if anyone? More...
 
std::string reason
 what was the cause of the exception? More...
 

Detailed Description

The SoDa Exception class.

Wherever possible, objects reporting exceptions should signal a subclass of the SoDaException class.

Definition at line 217 of file SoDaBase.hxx.

Constructor & Destructor Documentation

◆ SoDaException() [1/2]

SoDa::SoDaException::SoDaException ( const std::string &  _reason,
SoDaBase obj = NULL 
)
inline

The constructor.

Parameters
_reasonan informative string reporting the cause of the error
obja pointer to the SoDaBase object that triggered the exception (if any).

Definition at line 225 of file SoDaBase.hxx.

◆ SoDaException() [2/2]

SoDa::SoDaException::SoDaException ( const char *  _reason,
SoDaBase obj 
)
inline

The constructor.

Parameters
_reasonan informative string reporting the cause of the error
obja pointer to the SoDaBase object that triggered the exception (if any).

Definition at line 236 of file SoDaBase.hxx.

Member Function Documentation

◆ toString()

std::string SoDa::SoDaException::toString ( )
inline

Create a string that explains this exception.

Returns
the exception string

Definition at line 246 of file SoDaBase.hxx.

Referenced by main(), and SoDa::SoDaThread::outerRun().

◆ what()

const char* SoDa::SoDaException::what ( )
inline

Create a string that explains this exception.

Returns
a pointer to a c_str buffer (suitable for generic exception handling.)

Definition at line 262 of file SoDaBase.hxx.

Member Data Documentation

◆ reason

std::string SoDa::SoDaException::reason
private

what was the cause of the exception?

Definition at line 267 of file SoDaBase.hxx.

◆ thrower

SoDaBase* SoDa::SoDaException::thrower
private

who caused the exception, if anyone?

Definition at line 266 of file SoDaBase.hxx.


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