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

Nuke use of error in the library code #9

Open
relrod opened this issue Jun 18, 2017 · 0 comments
Open

Nuke use of error in the library code #9

relrod opened this issue Jun 18, 2017 · 0 comments

Comments

@relrod
Copy link
Collaborator

relrod commented Jun 18, 2017

We shouldn't use error but instead should return an Either or similar and correctly handle the case where we don't get a value back in the calling code.

ricky@localhost 99% ~/dev/haskell/habsim/haskell (master)$ git grep error | grep Data | grep -vE ':\s*--'
src/Data/HABSim/Internal.hs:  | alt <= (-500) = error "Altitude out of range, too low (<500m)"
src/Data/HABSim/Internal.hs:  | otherwise     = error "Altitude out of range, too high (>86km)"
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