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.

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 the compiler installation directory /latest/compiler/include/register/register_error_codes.h.