Table: | For specifying the type of error information to read |
+ combination: | For error types |
+ combination: | For getting the message size |
MIL_ID ContextAppId, | //in |
MIL_INT64 ErrorType, | //in |
void *ErrorPtr | //out |
This function obtains current or global application error information, for example, error codes, error subcodes, error messages, error submessages, function codes, and function names. This function allows you to check for errors after each MIL function call or to get the first error that occurred after a series of MIL function calls.
A typical use of this function is to check whether a buffer allocation call was successful (MbufAllocColor(), MbufAlloc1d(), and MbufAlloc2d()) or to see if a function returns an error.
In multi-thread environments, an MappGetError() call returns information either with the first error-returning function of the current thread or, if there no errors in the current thread, it checks for errors in the other MIL running threads. To return only errors in the current thread, see the combination constants, described below.
This function can also be used to obtain information about a detected error when error-reporting to the screen has been disabled using MappControl().
To clear errors, call MappControl() with M_CLEAR_ERROR.
Specifies the identifier of the application context to use.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the current application context. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the application context identifier. |
Specifies the type of error information to read. This parameter can be set to one of the values below.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to write the requested information.
The MappGetError() function also returns the error/function code; if you don't want to get an error message or function name, you can set this parameter to M_NULL.
See the Parameter associations section for possible values that can be returned.
The table below lists possible values for the ErrorType parameter and possible values returned to the ErrorPtr parameter.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ErrorPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the error code returned by the last function call. The current-error code is reset to M_NULL_ERROR before each MIL function call and is set to a specific error code when an error occurs during the execution of a function. (summarize)Retrieves the error code returned by the last function call. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the opcode associated with the last function called, when it returns an error. (summarize)Retrieves the opcode associated with the last function called, when it returns an error. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the first error subcode returned by the last function call. Note, when there is no error, the error subcode is set to M_NULL_ERROR. (summarize)Retrieves the first error subcode returned by the last function call. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the second error subcode returned by the last function call. Note, when there is no error, the error subcode is set to M_NULL_ERROR. (summarize)Retrieves the second error subcode returned by the last function call. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the third error subcode returned by the last function call. Note, when there is no error, the error subcode is set to M_NULL_ERROR. (summarize)Retrieves the third error subcode returned by the last function call. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the number of error subcodes associated with the last function called, when it returns an error. (summarize)Retrieves the number of error subcodes associated with the last function called, when it returns an error. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
You can add one or more of the following values to the above-mentioned values to set whether to return a message, make the inquire synchronous, or limit it to the current thread.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ErrorPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the error message associated with the specified error type, or the function name associated with a function code, and writes it to the address specified by the ErrorPtr parameter. The error/function code is still returned by MappGetError(), but it is not written to the address specified by ErrorPtr. Note that this value cannot be added to M_CURRENT_SUB_NB or M_GLOBAL_SUB_NB. (summarize)Retrieves the error message associated with the specified error type, or the function name associated with a function code, and writes it to the address specified by the ErrorPtr parameter. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Forces the function to wait for all pending calls to complete before continuing. (summarize)Forces the function to wait for all pending calls to complete before continuing. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that only errors are returned in the current thread. (summarize)Specifies that only errors are returned in the current thread. (more details...) |
You can add the following value to the above-mentioned value to get the message's length.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ErrorPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the length of the string, including the terminating null character ("\0"). (summarize)Retrieves the length of the string, including the terminating null character ("\0"). (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |