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

[Tracking] Better errors #107

Closed
wants to merge 12 commits into from
Closed

[Tracking] Better errors #107

wants to merge 12 commits into from

Conversation

@talex5
Copy link
Contributor

talex5 commented Mar 12, 2016

The mirage tool currently generates setup code that ignores the actual errors returned by the connect functions and prints a generic error. This PR tracks changes to mirage-types and to the various libraries to allow mirage to produce useful error messages. For example:

Before:

    Fatal error: exception Failure("block11")

After:

    *** Setup failure ***

    Error connecting block device "disk.img":
      block-unix: connecting "/home/user/work/cubieboard/skeleton/block/disk.img":
      Unix.Unix_error(Unix.ENOENT, "open", "/home/user/work/cubieboard/skeleton/block/disk.img")
@talex5 talex5 force-pushed the talex5:better-errors branch 2 times, most recently from 5c16f1c to 202309f Mar 14, 2016
@talex5 talex5 force-pushed the talex5:better-errors branch 2 times, most recently from 54b4843 to 3016df7 Mar 14, 2016
@talex5 talex5 force-pushed the talex5:better-errors branch from 3016df7 to a25c74b Mar 14, 2016
@samoht
Copy link
Member

samoht commented Mar 18, 2016

Great work! As we've discussed in Marrakesh, I think the only thing that I don't really like in these patch is the fact that users have to explicitly wrap their job with with_logs. I'd feel much happier if it was an optional argument with a default log reporter, that we can enable/disable on the command-line line. Other than that I'm very happy with the rest of the patches! :-)

@talex5
Copy link
Contributor Author

talex5 commented Mar 27, 2016

The attribute thing is easy to change. We need to wait for some solution to be accepted into Functoria first though:

mirage/functoria#55

@samoht
Copy link
Member

samoht commented Jul 14, 2016

I'm not super happy with error_string too, would be great if we had pp_error instead?

@hannesm
Copy link
Member

hannesm commented Oct 2, 2016

closing in favour of the merged mirage/mirage#602 (and #155 in here). would be great to get the error types updates massaged into mirage-types and implementation libraries!

@hannesm hannesm closed this Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.