This function places an error record onto the error stack.
Declaration:
|
Copy Code
|
AT_ERRCOUNT ACCUAPI IG_err_error_set(
const LPCHAR lpFileName,
INT iLineNumber,
AT_ERRCODE nCode,
UINT nLevel,
AT_INT lplValue1,
AT_INT lplValue2,
const LPCHAR lpExtraText
);
|
Arguments:
Name |
Type |
Description |
lpFileName |
const LPCHAR |
Pointer to a string that supplies the name of the module from which the error was generated. It is recommended that you use the _FILE_ constant in this field. |
iLineNumber |
INT |
An integer number indicating the line from which the error was set. It is recommended that you use the _LINE_ constant in this field. |
nCode |
AT_ERRCODE |
An integer value of type AT_ERRCODE. Set this to the code number of the error that you wish to place on the error stack. |
nLevel |
UINT |
The level of error. 0 means critical error (function failure); greater levels denote warnings. |
lplValue1 |
AT_INT |
Two LONG arguments are available so that you may supply any supporting information about the error. Your application might use these values to decide what to do after setting a particular kind of error. This is the first one. |
lplValue2 |
AT_INT |
The second argument for the supporting information about the error. See lplValue1. |
lpExtraText |
const LPCHAR |
Additional text description of the error. It can be NULL if it is not available. |
Return Value:
Returns the code of the ImageGear error that occurred during this function call. A value of zero means no errors have occurred. Errors that occurred during this function call are not appended onto the error stack.
Supported Raster Image Formats:
This function does not process image pixels.
Sample:
None
Example:
|
Copy Code
|
AT_ERRCODE iErrCode;
static const AT_ERRCODE MYERR_BAD_RASTER = (IGE_LAST_ERROR_NUMBER - 1);
// set application specific waining
iErrCode = IG_err_error_set( __FILE__, __LINE__, MYERR_BAD_RASTER, 2, 0, 0, "Some explanation" );
|
Remarks:
If you are setting an error code that you have defined yourself, you must make sure that it has a value less than ImageGear's IGE_LAST_ERROR_NUMBER. As the defined value of IGE_LAST_ERROR_NUMBER may change in the future, you should define your error codes relatively to IGE_LAST_ERROR_NUMBER, as demonstrated in the example, rather than use literal values.