MIL_ID ContextFuncId, | //in |
MIL_INT ErrorCode, | //in |
MIL_CONST_TEXT_PTR ErrorMessage, | //in |
MIL_CONST_TEXT_PTR ErrorSubMessage1, | //in |
MIL_CONST_TEXT_PTR ErrorSubMessage2, | //in |
MIL_CONST_TEXT_PTR ErrorSubMessage3 | //in |
This function allows you to log an error message in a user-defined MIL function using the MIL error handling mechanism. You can call the MfuncErrorReport() function from both the slave and the master functions of your user-defined MIL function, but only after a call to MfuncAlloc() and before a call to MfuncFree(). When MfuncErrorReport() is called, MIL will treat your error as a normal MIL 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 MIL 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 a MIL function call might have generated inside the user-defined MIL function. You must reset the pending error if you don't want the MIL error message to be reported. If you don't reset the pending error at the end of the slave function, and you don't report your own error, MIL will detect any pending error and report the error message, prefixed with the name of the user-defined MIL function.
Specifies the MIL function identifier. This parameter can be set to the following values:
For the MIL function
identifier
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default MIL function identifier. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL function identifier |
Specifies the identifier of a user-defined function. |
Specifies a numeric code to the user-defined MIL 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. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FUNC_ERROR + |
Specifies a numeric code to a group of error messages. (more details...) |
You can add the following value to the above-mentioned value to specify the offset.
For specifying the offset
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
0 <= Value <= 99 |
Specifies the value of the offset. |
Specifies the text of your error message to report.
For specifying the text of the error
message
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("ErrorMessage") 1 |
Specifies the text of your error message; this is a null-terminated string. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
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. |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("ErrorMessage") 1 |
Specifies the text of your error message; this is a null-terminated string. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
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. |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("ErrorMessage") 1 |
Specifies the text of your second error sub-message. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
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. |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("ErrorMessage") 1 |
Specifies the text of your third error sub-message. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |