Skip to content

standard error handling #53

Description

@mhw0

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.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions