common: add a status code for internal errors
This commit is contained in:
@@ -10,6 +10,7 @@ enum ivy_status {
|
|||||||
IVY_ERR_BAD_SYNTAX = -3,
|
IVY_ERR_BAD_SYNTAX = -3,
|
||||||
IVY_ERR_NO_MEMORY = -4,
|
IVY_ERR_NO_MEMORY = -4,
|
||||||
IVY_ERR_NOT_SUPPORTED = -5,
|
IVY_ERR_NOT_SUPPORTED = -5,
|
||||||
|
IVY_ERR_INTERNAL_FAILURE = -6,
|
||||||
};
|
};
|
||||||
|
|
||||||
IVY_API const char *ivy_status_to_string(enum ivy_status status);
|
IVY_API const char *ivy_status_to_string(enum ivy_status status);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const char *ivy_status_to_string(enum ivy_status status)
|
|||||||
ENUM_STR(IVY_ERR_BAD_SYNTAX);
|
ENUM_STR(IVY_ERR_BAD_SYNTAX);
|
||||||
ENUM_STR(IVY_ERR_NO_MEMORY);
|
ENUM_STR(IVY_ERR_NO_MEMORY);
|
||||||
ENUM_STR(IVY_ERR_NOT_SUPPORTED);
|
ENUM_STR(IVY_ERR_NOT_SUPPORTED);
|
||||||
|
ENUM_STR(IVY_ERR_INTERNAL_FAILURE);
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user