Click here to show toolbars of the Web Online Help System: show toolbars |
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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the opcode associated with the last function called, when it returns an error. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the first error subcode returned by the last function call. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the second error subcode returned by the last function call. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the third error subcode returned by the last function call. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Data type info: Data
type: array of type MIL_TEXT_CHAR
(more
details...)
|
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Forces the function to wait for all pending calls to complete before continuing. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that only errors are returned in the current thread. |
You can add the following value to the above-mentioned value to get the message's length.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Retrieves the length of the string, including the terminating null character ("\0"). |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |