MfuncErrorReport
| Board | Supported |
|---|---|
| Host System | Yes |
| V4L2 | Yes |
| Clarity UHD | Yes |
| Concord PoE | No |
| GenTL | Yes |
| GevIQ | Yes |
| GigE Vision | Yes |
| Indio | No |
| Iris GTX | Yes |
| Radient eV-CL | Yes |
| Rapixo CL | Yes |
| Rapixo CoF | Yes |
| Rapixo CXP | Yes |
| USB3 Vision | Yes |
Report an error message.
Syntax
AIL_INT MfuncErrorReport(
AIL_ID ContextFuncId, //in
AIL_INT ErrorCode, //in
AIL_CONST_TEXT_PTR ErrorMessage, //in
AIL_CONST_TEXT_PTR ErrorSubMessage1, //in
AIL_CONST_TEXT_PTR ErrorSubMessage2, //in
AIL_CONST_TEXT_PTR ErrorSubMessage3 //in
)
Description
This function allows you to log an error message in a user-defined Aurora Imaging Library function using the Aurora Imaging Library error handling mechanism. You can call the MfuncErrorReport function from both the callee and the caller functions of your user-defined Aurora Imaging Library function, but only after a call to MfuncAlloc and before a call to MfuncFree. When MfuncErrorReport is called, Aurora Imaging Library will treat your error as a normal Aurora Imaging Library error. To report the logged messages to screen, you must enable error reporting using the MappControl function. These errors can also be read using the standard Aurora Imaging Library error functions (MappGetError), which is especially useful when you want to keep error reporting disabled.
If you report an error with an error code set to M_NULL, you will reset any pending internal error that an Aurora Imaging Library function call might have generated inside the user-defined Aurora Imaging Library function. You must reset the pending error if you don't want the Aurora Imaging Library error message to be reported. If you don't reset the pending error at the end of the callee function, and you don't report your own error, Aurora Imaging Library will detect any pending error and report the error message, prefixed with the name of the user-defined Aurora Imaging Library function.
Parameters
ContextFuncId (in, AIL_ID)
Specifies the Aurora Imaging Library function identifier. This parameter can be set to the following values:
For the Aurora Imaging Library function identifier
| Value | Description |
|---|---|
M_DEFAULT | Specifies the default Aurora Imaging Library function identifier. Use this value when MfuncErrorReport is called from within a callee function. |
Function identifier | Specifies the identifier of a user-defined function. |
ErrorCode (in, AIL_INT)
Specifies a numeric code to the user-defined Aurora Imaging Library function's group of error messages. To specify the error code, combine the value in the table below with an offset. For example, M_FUNC_ERROR + 65.
For assigning a numeric code
| Value | Description |
|---|---|
M_NULL | Specifies that no error message will be returned. Any pending internal error generated by an Aurora Imaging Library function call inside the user-defined Aurora Imaging Library function will be reset. |
M_FUNC_ERROR | Specifies a numeric code to a group of error messages. By specifying this value, you ensure that the error messages of the user-defined Aurora Imaging Library function do not conflict with Aurora Imaging Library specific errors. |
For specifying the offset
| Value | Description |
|---|---|
0 <= Value <= 99 | Specifies the value of the offset. |
ErrorMessage (in, AIL_CONST_TEXT_PTR)
Specifies the text of your error message to report.
For specifying the text of the error message
| Value | Description |
|---|---|
"ErrorMessage" | Specifies the text of your error message; this is a null-terminated string. |
The error message, including the terminating null character ("\0"), must not be longer than M_ERROR_MESSAGE_SIZE (320) characters. |
ErrorSubMessage1 (in, AIL_CONST_TEXT_PTR)
Specifies the text of your first error sub-message to report.
For specifying the text of the first error sub-message
| Value | Description |
|---|---|
M_NULL | Specifies that you do not want to use this error sub-message. |
"ErrorMessage" | Specifies the text of your error message; this is a null-terminated string. |
The error message, including the terminating null character ("\0"), must not be longer than M_ERROR_MESSAGE_SIZE (320) characters. |
ErrorSubMessage2 (in, AIL_CONST_TEXT_PTR)
Specifies the text of your second error sub-message to report.
For specifying the text of the second error sub-message
| Value | Description |
|---|---|
M_NULL | Specifies that you do not want to use this error sub-message. |
"ErrorMessage" | Specifies the text of your second error sub-message. |
For details on creating appropriate error sub-messages, see the description of the ErrorSubMessage1 parameter. |
ErrorSubMessage3 (in, AIL_CONST_TEXT_PTR)
Specifies the text of your third error sub-message to report.
For specifying the text of the third error sub-message
| Value | Description |
|---|---|
M_NULL | Specifies that you do not want to use this error sub-message. |
"ErrorMessage" | Specifies the text of your third error sub-message. |
For details on creating appropriate error sub-messages, see the description of the ErrorSubMessage1 parameter. |
Return Value
Type: AIL_INT
The returned value is M_NULL if an error occurred during the error log operation; otherwise, not M_NULL.