Table: | For assigning a numeric code |
+ combination: | For specifying the offset |
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:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default MIL function identifier. Use this value when MfuncErrorReport() is called from within a slave function. (summarize)Specifies the default MIL function identifier. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no error message will be returned. Any pending internal error generated by a MIL function call inside the user-defined MIL function will be reset. (summarize)Specifies that no error message will be returned. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a numeric code to a group of error messages. By specifying this value, you ensure that the error messages of the user-defined MIL function do not conflict with MIL specific errors. (summarize)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.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the value of the offset. |
Specifies the text of your error message to report.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. (summarize)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.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that you do not want to use this error sub-message. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. (summarize)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.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that you do not want to use this error sub-message. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the text of your second error sub-message. For details on creating appropriate error sub-messages, see the description of the ErrorSubMessage1 parameter. (summarize)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.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that you do not want to use this error sub-message. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the text of your third error sub-message. For details on creating appropriate error sub-messages, see the description of the ErrorSubMessage1 parameter. (summarize)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. |