Celartem::Exception Class Reference

#include <cel_exception.h>

Inheritance diagram for Celartem::Exception:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Exception (GeneralErrorDefinition inError, const char *inErrorDesc, const char *inFileName, int inLine, const char *inFuncName="")
 Exception (GeneralErrorDefinition inError, const String &inErrorDesc, const char *inFileName, int inLine, const char *inFuncName="")
 Exception (const Exception &inException)
Exceptionoperator= (const Exception &inException)
GeneralErrorDefinition getError () const
String getMessage () const
virtual const char * what () const throw ()


Detailed Description

Exception class defines the base class for the exceptions used in this library. Although you can explicitly throw instances of this class, you should use celThrow or celThrow2 to throw exceptions.
See also:
Exception Handling, celThrow, celThrow2, GeneralErrorDefinition

Definition at line 75 of file cel_exception.h.


Constructor & Destructor Documentation

Celartem::Exception::Exception ( GeneralErrorDefinition  inError,
const char *  inErrorDesc,
const char *  inFileName,
int  inLine,
const char *  inFuncName = "" 
)

Create a new Exception. This constructor should not be called directly, you had better use celThrow, celThrow2 macros.

Parameters:
inError An error code defined in GeneralErrorDefinition.
inErrorDesc A string that represents the details of the error status.
inFileName A filename of the source file that contains the caller. Usually, you should set __FILE__ macro.
inLine A line number in the source file that contains the caller. Usually, you should set __LINE__ macro.
inFuncName The name of the function that throws this exception. You can set __FUNCTION__ macro for this parameter.
See also:
celThrow, celThrow2

Celartem::Exception::Exception ( GeneralErrorDefinition  inError,
const String inErrorDesc,
const char *  inFileName,
int  inLine,
const char *  inFuncName = "" 
)

Create a new Exception. This constructor should not be called directly, you had better use celThrow, celThrow2 macros.

Parameters:
inError An error code defined in GeneralErrorDefinition.
inErrorDesc A string that represents the details of the error status.
inFileName A filename of the source file that contains the caller. Usually, you should set __FILE__ macro.
inLine A line number in the source file that contains the caller. Usually, you should set __LINE__ macro.
inFuncName The name of the function that throws this exception. You can set __FUNCTION__ macro for this parameter.
See also:
celThrow, celThrow2

Celartem::Exception::Exception ( const Exception inException  ) 

Duplicate the exception.

Parameters:
inException An Logs instance to duplicate.


Member Function Documentation

Exception& Celartem::Exception::operator= ( const Exception inException  ) 

Duplicate the exception.

Parameters:
inException An Logs instance to duplicate.

GeneralErrorDefinition Celartem::Exception::getError (  )  const

Gets the error code.

Returns:
An error code. This is usually one of GeneralErrorDefinition enumeration values but you should not assume the code is in them.
See also:
GeneralErrorDefinition, celThrow, celThrow2

String Celartem::Exception::getMessage (  )  const

Get the error message.

Returns:
Error string. This is almost same to what method but it is in String instance.

virtual const char* Celartem::Exception::what (  )  const throw () [virtual]

Get the error message.

Returns:
Error string.


The documentation for this class was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:16 2008.