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

Simplify error handling #49

Open
grovesNL opened this issue Feb 2, 2018 · 0 comments
Open

Simplify error handling #49

grovesNL opened this issue Feb 2, 2018 · 0 comments

Comments

@grovesNL
Copy link
Owner

grovesNL commented Feb 2, 2018

Some functions (especially simple getter-like functions) could probably avoid returning a Result and simply return the type, because we don't actually expect exceptions to be thrown on the C++ side.

As well, reconsider ErrorCode. Perhaps a String is sufficient for these cases and we can avoid the enum altogether.

bors bot added a commit that referenced this issue Jul 23, 2020
147: implement std::error::Error for ErrorCode r=grovesNL a=bootra-dev

With respect to #49, I think that keeping an error type is the most flexible way to handle errors. This pull request implements Error (and by requirement, Display), to make integrating with other error types easier.

Co-authored-by: bootra-dev <[email protected]>
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