SoDaRadio-12.2.0-cut_dependencies:6c82803
Loading...
Searching...
No Matches
SoDa::SDR::Exception Class Reference

The SoDa::SDR Exception class (to distinguish it from the SoDaLibrary SoDa::Exception class. More...

#include <SoDaBase.hxx>

Inheritance diagram for SoDa::SDR::Exception:
SoDa::MissingMailBox

Public Member Functions

 Exception (const std::string &_reason, BasePtr obj=NULL)
 The constructor.
 Exception (const char *_reason, BasePtr obj)
 The constructor.
 Exception (const SoDa::Format &_reason, BasePtr obj)
 The constructor.
const std::string & toString ()
 Create a string that explains this exception.
const char * what ()
 Create a string that explains this exception.

Private Attributes

BasePtr thrower
 who caused the exception, if anyone?
std::string reason
 what was the cause of the exception?
std::string message
 the reason together with the owner.

Detailed Description

The SoDa::SDR Exception class (to distinguish it from the SoDaLibrary SoDa::Exception class.

Dammit.

Wherever possible, objects reporting exceptions should signal a subclass of the SoDa::Exception class.

Definition at line 166 of file SoDaBase.hxx.

Constructor & Destructor Documentation

◆ Exception() [1/3]

SoDa::SDR::Exception::Exception ( const std::string & _reason,
BasePtr 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 174 of file SoDaBase.hxx.

References reason, and thrower.

Referenced by SoDa::MissingMailBox::MissingMailBox().

◆ Exception() [2/3]

SoDa::SDR::Exception::Exception ( const char * _reason,
BasePtr obj )
inline

The constructor.

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

Definition at line 185 of file SoDaBase.hxx.

References reason, and thrower.

◆ Exception() [3/3]

SoDa::SDR::Exception::Exception ( const SoDa::Format & _reason,
BasePtr obj )
inline

The constructor.

Parameters
_reasona SoDa::Format object with an explanation of the error
obja pointer to the SoDa::Base object that triggered the exception (if any).

Definition at line 196 of file SoDaBase.hxx.

References reason, and thrower.

Member Function Documentation

◆ toString()

const std::string & SoDa::SDR::Exception::toString ( )
inline

Create a string that explains this exception.

Returns
the exception string

Definition at line 205 of file SoDaBase.hxx.

References message, reason, and thrower.

Referenced by what().

◆ what()

const char * SoDa::SDR::Exception::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 225 of file SoDaBase.hxx.

References message, and toString().

Member Data Documentation

◆ message

std::string SoDa::SDR::Exception::message
private

the reason together with the owner.

Definition at line 233 of file SoDaBase.hxx.

Referenced by toString(), and what().

◆ reason

std::string SoDa::SDR::Exception::reason
private

what was the cause of the exception?

Definition at line 231 of file SoDaBase.hxx.

Referenced by Exception(), Exception(), Exception(), and toString().

◆ thrower

BasePtr SoDa::SDR::Exception::thrower
private

who caused the exception, if anyone?

Definition at line 230 of file SoDaBase.hxx.

Referenced by Exception(), Exception(), Exception(), SoDa::MissingMailBox::MissingMailBox(), and toString().


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