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

Net.lookup returns Or_error rather than raising #247

Merged
merged 1 commit into from
Feb 15, 2015

Conversation

rgrinberg
Copy link
Member

I don't think Net.lookup can throw any other way so Or_error is appropriate.

@dbuenzli
Copy link

Don't you want to be able to distinguish the errors programatically ? If that's the case you should rather use a proper variant for the error report (sorry don't have time to have a close look at that).

@rgrinberg
Copy link
Member Author

@dbuenzli In this case we don't care about distinguishing what particular error it is because the function itself isn't even exported. Also, I agree with using variants for representing errors but it seems like it's core's convention to use Error.t.

I'll fix the message however.

https://realworldocaml.org/v1/en/html/error-handling.html

@rgrinberg rgrinberg force-pushed the remove_one_exception branch 2 times, most recently from 600c650 to 5c6a8d9 Compare February 6, 2015 04:34
@avsm avsm merged commit 5c6a8d9 into mirage:master Feb 15, 2015
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

Successfully merging this pull request may close these issues.

None yet

3 participants