Public Member Functions | Private Attributes

cmtk::Exception Class Reference
[cmtkSystem Library]

Exception class. More...

#include <cmtkException.h>

Inheritance diagram for cmtk::Exception:
Inheritance graph
[legend]
Collaboration diagram for cmtk::Exception:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Exception (const std::string &errorMsg="", const void *const fromObject=NULL)
 Constructor.
virtual ~Exception () throw ()
 Virtual destructor.
const std::string & GetErrorMsg () const
 Return pointer to the error message.
const void * GetFromObject () const
 Return pointer to the object that encountered the error condition.
virtual const char * what () const throw ()
 Overwrite inherited "what" member.

Private Attributes

std::string m_ErrorMsg
 Pointer to a string describing the condition causing the exception.
const void * m_FromObject
 Pointer to the object that encountered the error condition.

Detailed Description

Exception class.

Instances of this class are "thrown" in case of severe program errors. They can be given an optional error message and a pointer to the object that encountered the fatal condition.

Definition at line 56 of file cmtkException.h.


Constructor & Destructor Documentation

cmtk::Exception::Exception ( const std::string &  errorMsg = "",
const void *const   fromObject = NULL 
) [inline]

Constructor.

Parameters:
errorMsgAn optional error message describing the condition causing the exception.
fromObjectAn optional pointer to the object that encountered the condition causing the exception.

Definition at line 67 of file cmtkException.h.

virtual cmtk::Exception::~Exception (  ) throw () [inline, virtual]

Virtual destructor.

Definition at line 74 of file cmtkException.h.


Member Function Documentation

const std::string& cmtk::Exception::GetErrorMsg (  ) const [inline]

Return pointer to the error message.

Definition at line 78 of file cmtkException.h.

const void* cmtk::Exception::GetFromObject (  ) const [inline]

Return pointer to the object that encountered the error condition.

Definition at line 82 of file cmtkException.h.

virtual const char* cmtk::Exception::what (  ) const throw () [inline, virtual]

Member Data Documentation

std::string cmtk::Exception::m_ErrorMsg [private]

Pointer to a string describing the condition causing the exception.

Definition at line 92 of file cmtkException.h.

const void* cmtk::Exception::m_FromObject [private]

Pointer to the object that encountered the error condition.

Definition at line 95 of file cmtkException.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines