You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we define the error types in include/librats/err.h, but there are still some problems.
We have many similar error status, such as RATS_ERR_NONE, RATS_ATTESTER_ERR_NONE, RATS_VERIFIER_ERR_NONE. Currently we must be careful to avoid returning RATS_ATTESTER_ERR_NONE in functions of type rats_err_t. because caller usually just compares it with RATS_ERR_NONE. Same problem also exists when calling the rats_err_t function from a function of type rats_attester_err_t.
There seems to be confusion as to when to return a negative value for an error code. Although previous work has attempted to remove -, a few codes(1, 2)still use it.
The ERR_CODE_SUBCLASS is not clearly defined, and it seems to be a wrapper for some underlying error type. But it seems that subclass bits is erased in the definition of this macro.
I suggest a redesign of the error types, at least
We should clearly define the relationship between rats_err_t and the following rats_attester_err_t, rats_verifier_err_t. E.g., is rats_err_t is a superclass of the latter two?
We need to clarify when we should use rats_err_t, rats_attester_err_t, rats_verifier_err_t. For example, should some generic utility functions use rats_err_t, even though they may be called by functions of type rats_attester_err_t?
Need a better way to call each other between different types of functions.
The text was updated successfully, but these errors were encountered:
Currently, we define the error types in
include/librats/err.h
, but there are still some problems.RATS_ERR_NONE
,RATS_ATTESTER_ERR_NONE
,RATS_VERIFIER_ERR_NONE
. Currently we must be careful to avoid returningRATS_ATTESTER_ERR_NONE
in functions of typerats_err_t
. because caller usually just compares it withRATS_ERR_NONE
. Same problem also exists when calling therats_err_t
function from a function of typerats_attester_err_t
.-
, a few codes(1, 2)still use it.I suggest a redesign of the error types, at least
rats_err_t
and the followingrats_attester_err_t
,rats_verifier_err_t
. E.g., israts_err_t
is a superclass of the latter two?rats_err_t
,rats_attester_err_t
,rats_verifier_err_t
. For example, should some generic utility functions userats_err_t
, even though they may be called by functions of typerats_attester_err_t
?The text was updated successfully, but these errors were encountered: