GetErrorInfo

Function Usage

Obtains the error information based on the error code.

Prototype

1
std::string GetErrorInfo(const APP_ERROR err, std::string callingFuncName = "")

Parameters

Parameter

Input/Output

Description

err

Input

Error code, of the APP_ERROR type.

callingFuncName

Input

Name of the function that generates an error code, of the std::string type. This parameter should only be passed when the error code is a CANN error code. It is used to record the name of the CANN function that generates the error code to facilitate subsequent error locating.

Response Parameters

Data Structure

Description

std::string

Error information corresponding to the error code, which helps users locate errors. For details about the error codes, see APP_ERROR Description.