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

Rather than panicking when an error occurs, all functions should return a Result enum #6

Open
zcdziura opened this issue Jun 1, 2016 · 0 comments

Comments

@zcdziura
Copy link
Owner

zcdziura commented Jun 1, 2016

Good library design dictates that the library itself should never panic. Instead, it should return meaningful error messages, allowing the user the control over what should happen to their program. Currently, should the user give bad inputs, the various prime generation functions panic!. Instead, they should return some type of Result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant