DECLARE_ERRORNO

Provides macros for registering the following error codes and their descriptions.

  • SUCCESS: success.
  • FAILED: failure.
  • PARAM_INVALID: invalid argument.
  • SCOPE_NOT_CHANGED: scope fusion pattern not matched. The current pattern is ignored.

The declaration is as follows.

1
2
3
4
DECLARE_ERRORNO(0, 0, SUCCESS, 0);
DECLARE_ERRORNO(0xFF, 0xFF, FAILED, 0xFFFFFFFF);
DECLARE_ERRORNO_COMMON(PARAM_INVALID, 1);  // 50331649
DECLARE_ERRORNO(SYSID_FWK, 1, SCOPE_NOT_CHANGED, 201);

You can view the error code definition in ${INSTALL_DIR}/compiler/include/register/register_error_codes.h.

Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.