aclGetRecentErrMsg

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Obtains and clears the error messages returned by other failed acl API calls in the same process or thread.

The err_msg_mode configuration item in the aclInit API determines whether to obtain the process-level or thread-level error message. The thread-level error message is obtained by default.

You are advised to make a separate aclGetRecentErrMsg call upon each acl API call failure to facilitate troubleshooting. Otherwise, error messages may be stacked or lost. If aclGetRecentErrMsg has been called multiple times in a process or thread, only the error message string pointer returned by the most recent call is valid. Do not use those returned by the previous calls as this will result in unauthorized memory access.

Prototype

const char *aclGetRecentErrMsg()

Parameters

None

Returns

Success: a pointer to the error message string. If multiple error messages are obtained, the latest error message is displayed on the top.

Failure: nullptr