Skip to content

Introducing ErrorCode #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

andreagilardoni
Copy link
Contributor

The objective of this PR is to introduce a method to provide better error codes to our apis.

This is intended to provide:

  • Error codes, different from the generic 0 value return
  • Unified error codes values

The objective of error code class to wrap an integer that may be
returned from a function that may fail for different reasons. Since we
are not able to return values different from 0 in case of error in the
arduino language we need to wrap them into this class and redefine
boolean operator to mantain the same behaviour
The objective of ReturnValue is to maintain coherency with ErrorCode
class in cases where a single value is used to represent both the error
and the return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants