#include <cel_exception.h>
List of all members.
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
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 Exception instance to duplicate. |
Member Function Documentation
| 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.
Duplicate the exception.
- Parameters:
-
| inException | An Exception instance to duplicate. |
| static void Celartem::Exception::setOnExceptionCallback |
( |
void(*)(const Exception &) |
onExcepionCallback |
) |
[static] |
Set callback function, which is called when any of Exception instance is created.
- Parameters:
-
| onExcepionCallback | Callback function or NULL to disable callback. |
| 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: