libcamgm
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
ca_mgm::Exception Class Reference

#include <Exception.hpp>

Inheritance diagram for ca_mgm::Exception:
ca_mgm::MemoryException ca_mgm::OutOfBoundsException ca_mgm::OverflowException ca_mgm::RuntimeException ca_mgm::SyntaxException ca_mgm::SystemException ca_mgm::ValueException

Public Member Functions

 Exception (const Exception &e)
 
Exceptionoperator= (const Exception &rhs)
 
virtual ~Exception () throw ()
 
virtual const char * type () const
 
virtual const char * getMessage () const
 
virtual std::string getFullMessage () const
 
const char * getFile () const
 
int getLine () const
 
int getErrorCode () const
 
virtual const char * what () const throw ()
 

Protected Member Functions

 Exception (const char *file, int line, const char *msg, int errorCode, const Exception *otherException=0)
 

Private Attributes

char * m_file
 
int m_line
 
char * m_msg
 
int m_errorCode
 

Friends

std::ostream & operator<< (std::ostream &str, const Exception &obj)
 

Constructor & Destructor Documentation

ca_mgm::Exception::Exception ( const char *  file,
int  line,
const char *  msg,
int  errorCode,
const Exception otherException = 0 
)
protected
ca_mgm::Exception::Exception ( const Exception e)
virtual ca_mgm::Exception::~Exception ( )
throw (
)
virtual

Member Function Documentation

int ca_mgm::Exception::getErrorCode ( ) const

Returns the error code representing the error which occurred. Code are unique only in the scope of the derived exception class. May return UNKNONWN_ERROR_CODE if the error is unavailable.

const char* ca_mgm::Exception::getFile ( ) const

Returns the file. May return 0.

virtual std::string ca_mgm::Exception::getFullMessage ( ) const
virtual

Returns the full message. This function will not throw. Derived class implementations must not throw.

int ca_mgm::Exception::getLine ( ) const
virtual const char* ca_mgm::Exception::getMessage ( ) const
virtual

Returns the message. May return 0. This function will not throw. Derived class implementations must not throw.

Exception& ca_mgm::Exception::operator= ( const Exception rhs)
virtual const char* ca_mgm::Exception::type ( ) const
virtual

Returns a string representing the concrete type. e.g. "SocketException". Will not return 0. This function will not throw. Derived class implementations must not throw.

Reimplemented in ca_mgm::OutOfBoundsException, ca_mgm::SystemException, ca_mgm::ValueException, ca_mgm::SyntaxException, ca_mgm::OverflowException, ca_mgm::RuntimeException, and ca_mgm::MemoryException.

virtual const char* ca_mgm::Exception::what ( ) const
throw (
)
virtual

Returns getMessage()

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const Exception obj 
)
friend

Member Data Documentation

int ca_mgm::Exception::m_errorCode
private
char* ca_mgm::Exception::m_file
private
int ca_mgm::Exception::m_line
private
char* ca_mgm::Exception::m_msg
private

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