nidas v1.2.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nidas::util::Exception Class Reference

#include <Exception.h>

Inheritance diagram for nidas::util::Exception:
Inheritance graph
[legend]

Public Member Functions

 Exception (const std::string &n, const std::string &m)
 Constructor for an exception.
 
 Exception (const std::string &m, int ierr)
 Constructor for an exception.
 
 Exception (const std::string &m)
 
 Exception (const Exception &e)
 Copy constructor.
 
Exceptionoperator= (const Exception &e)
 
virtual ~Exception () throw ()
 
virtual Exceptionclone () const
 
virtual int getErrno () const
 
virtual std::string toString () const throw ()
 
virtual const char * what () const throw ()
 

Static Public Member Functions

static std::string errnoToString (int err)
 Return string description of an errno (from errno.h).
 

Protected Member Functions

 Exception (const std::string &type, const std::string &n, const std::string &m)
 
 Exception (const std::string &type, const std::string &n, int ierr)
 

Protected Attributes

std::string _what
 
int _errno
 

Constructor & Destructor Documentation

◆ Exception() [1/6]

nidas::util::Exception::Exception ( const std::string & type,
const std::string & n,
const std::string & m )
inlineprotected

Referenced by clone().

◆ Exception() [2/6]

nidas::util::Exception::Exception ( const std::string & type,
const std::string & n,
int ierr )
inlineprotected

◆ Exception() [3/6]

nidas::util::Exception::Exception ( const std::string & n,
const std::string & m )
inline

Constructor for an exception.

Typical use: Exception e("RealBadSituation","help!");

◆ Exception() [4/6]

nidas::util::Exception::Exception ( const std::string & m,
int ierr )
inline

Constructor for an exception.

Typical use: Exception e("fork",errno);

◆ Exception() [5/6]

nidas::util::Exception::Exception ( const std::string & m)
inline

◆ Exception() [6/6]

nidas::util::Exception::Exception ( const Exception & e)
inline

Copy constructor.

◆ ~Exception()

virtual nidas::util::Exception::~Exception ( )
throw ( )
inlinevirtual

Member Function Documentation

◆ clone()

virtual Exception * nidas::util::Exception::clone ( ) const
inlinevirtual

◆ errnoToString()

string nidas::util::Exception::errnoToString ( int err)
static

◆ getErrno()

virtual int nidas::util::Exception::getErrno ( ) const
inlinevirtual

References _errno.

◆ operator=()

Exception & nidas::util::Exception::operator= ( const Exception & e)
inline

References _errno, and _what.

Referenced by nidas::util::IOException::operator=().

◆ toString()

virtual std::string nidas::util::Exception::toString ( ) const
throw ( )
inlinevirtual

References _what.

◆ what()

virtual const char * nidas::util::Exception::what ( ) const
throw ( )
inlinevirtual

Member Data Documentation

◆ _errno

int nidas::util::Exception::_errno
protected

Referenced by getErrno(), and operator=().

◆ _what

std::string nidas::util::Exception::_what
protected

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