The current status of error handling is a bit mess, some functions return number value (length of data for instance) while some return status code.
I think we should standardize error handling for all the functions.
Suggestion:
enum eth_op {
ETH_OK = 0,
ETH_ERR_INVALID_ARGS = 1
}
enum eth_op eth_rlp_uint8(...) {
if (args not looking ok) {
return ETH_ERR_INVALID_ARGS;
}
... do something
return ETH_OK;
}
Breaks the compatibility, that's why it should be released in the major update.
The current status of error handling is a bit mess, some functions return number value (length of data for instance) while some return status code.
I think we should standardize error handling for all the functions.
Suggestion:
Breaks the compatibility, that's why it should be released in the major update.