Skip to content
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

Refactor Error Translation #9

Closed
daniel-j-h opened this issue Nov 1, 2016 · 1 comment
Closed

Refactor Error Translation #9

daniel-j-h opened this issue Nov 1, 2016 · 1 comment

Comments

@daniel-j-h
Copy link
Collaborator

The serial sub-system provides it's own error types to be fully encapsulated and to not go near circular dependencies. The translation to sweep's error types happens manually all over the place in sweep.c (e.g.

if (serialerror) {
*error = sweep_error_construct("unable to write command");
sweep_serial_error_destruct(serialerror);
return;
}
where the serial error message is even discarded).

Refactor this translation into a helper function.

@daniel-j-h
Copy link
Collaborator Author

Update: we're using C++11 in our implementation now and only expose error codes to the outside (C API boundary). When working on this think about if it would make sense to throw sub-system exceptions catching them at the boundary. See discussion in #33 (comment).

@MikeGitb MikeGitb mentioned this issue Feb 12, 2017
daniel-j-h added a commit that referenced this issue May 4, 2017
daniel-j-h added a commit that referenced this issue May 6, 2017
daniel-j-h added a commit that referenced this issue May 6, 2017
daniel-j-h added a commit that referenced this issue May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant