#include <cel_exception.h>
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
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. |
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.
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: