File QnnError.h

Parent directory (include/QNN)

Error handling API.

Definition (include/QNN/QnnError.h)

Detailed Description

Requires Backend to be initialized. Provides means to get detailed error information.

Includes

Full File Listing

Error handling API.

    Requires Backend to be initialized.
    Provides means to get detailed error information.

Enums

enum QnnError_Error_t

QNN Error API result / error codes.

Values:

enumerator QNN_ERROR_MIN_ERROR = 10000
enumerator QNN_ERROR_NO_ERROR = 0

Qnn Error success.

enumerator QNN_ERROR_INVALID_ARGUMENT = 10000 + 0

Invalid function argument.

enumerator QNN_ERROR_INVALID_ERROR_HANDLE = 10000 + 1

Unrecognized or invalid error handle.

enumerator QNN_ERROR_MAX_ERROR = 10999
enumerator QNN_ERROR_UNDEFINED = 0x7FFFFFFF

Functions

Qnn_ErrorHandle_t QnnError_getMessage(Qnn_ErrorHandle_t errorHandle, const char **errorMessage)

Query QNN backend for string message describing the error code. Returned message should contain basic information about the nature of the error.

Parameters
  • errorHandle[in] Error handle to request descriptive message for.

  • errorMessage[out] Pointer to a null terminated character array containing the message associated with the passed errorHandle. The memory is statically owned and should not be freed by the caller. If errorHandle is not recognized, the pointer errorMessage points to is set to nullptr.

Returns

Error code:

  • QNN_SUCCESS: error string corresponding to the error handle successfully queried

  • QNN_ERROR_INVALID_ARGUMENT: errorMessage is null

  • QNN_ERROR_INVALID_ERROR_HANDLE: errorHandle not recognized

Qnn_ErrorHandle_t QnnError_getVerboseMessage(Qnn_ErrorHandle_t errorHandle, const char **errorMessage)

Query QNN backend for verbose string message describing the error code. Returned message should contain detailed information about the nature of the error.

Parameters
  • errorHandle[in] Error handle to request descriptive message for.

  • errorMessage[out] Pointer to a null terminated character array containing the verbose message associated with the passed errorHandle. The memory is owned by the backend and only freed when the caller invokes QnnError_freeVerboseMessage, passing the same error handle. If errorHandle is not recognized, the pointer errorMessage points to is set to nullptr.

Returns

Error code:

  • QNN_SUCCESS: error string corresponding to the error handle successfully queried

  • QNN_ERROR_INVALID_ARGUMENT: errorMessage is null

  • QNN_ERROR_INVALID_ERROR_HANDLE: errorHandle not recognized by backend

Qnn_ErrorHandle_t QnnError_freeVerboseMessage(const char *errorMessage)

Inform QNN backend that the memory associated with the verbose message returned by a previous call to QnnError_getVerboseMessage will no longer be accessed by the caller and may be freed.

Parameters

errorMessage[in] Address of character buffer returned in previous call to QnnError_getVerboseMessage.

Returns

Error code:

  • QNN_SUCCESS: backend acknowledges the caller will no longer access memory associated with previous call to QnnError_getVerboseMessage

  • QNN_ERROR_INVALID_ARGUMENT: errorMessage is null or unrecognized