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

[pt::Builder] add error handling #96

Merged
merged 1 commit into from Jul 13, 2014

Conversation

Projects
None yet
4 participants
@errordeveloper
Copy link
Member

commented Jul 13, 2014

first pass at some of the TODO items

let mut builder = Builder::new(pt.clone());

if !pt.expect_subnodes(cx, ["mcu", "os", "drivers"]) {
return builder; // TODO(farcaller): report error?
return None; // TODO(farcaller): report error?

This comment has been minimized.

Copy link
@errordeveloper

errordeveloper Jul 13, 2014

Author Member

@farcaller by "report error", did you mean printing out something decent here?

This comment has been minimized.

Copy link
@farcaller

farcaller Jul 13, 2014

Member

expect_subnodes will add an error to session, so no additional output is required, you can remove the TODO.

@@ -51,7 +51,7 @@ pub fn macro_platformtree(cx: &mut ExtCtxt, _: Span, tts: &[ast::TokenTree])
let pt = Parser::new(cx, tts).parse_platformtree();
let builder = Builder::build(cx, pt.unwrap());

let items = builder.emit_items(cx);
let items = builder.unwrap().emit_items(cx);

This comment has been minimized.

Copy link
@farcaller

farcaller Jul 13, 2014

Member

Please do not add unwrap()s in user-facing paths any more, use expect (with line!()).

@errordeveloper

This comment has been minimized.

Copy link
Member Author

commented Jul 13, 2014

r=farcaller

@farcaller

This comment has been minimized.

Copy link

commented on 5094694 Jul 13, 2014

r+

@hacknbot

This comment has been minimized.

Copy link
Contributor

commented on 5094694 Jul 13, 2014

saw approval from farcaller
at errordeveloper@5094694

This comment has been minimized.

Copy link
Contributor

replied Jul 13, 2014

merging errordeveloper/zinc/pt_error_handling = 5094694 into auto

This comment has been minimized.

Copy link
Contributor

replied Jul 13, 2014

errordeveloper/zinc/pt_error_handling = 5094694 merged ok, testing candidate = 0cfa335

This comment has been minimized.

Copy link
Contributor

replied Jul 13, 2014

hacknbot added a commit that referenced this pull request Jul 13, 2014

Merge pull request #96 from errordeveloper/pt_error_handling
[pt::Builder] add error handling

Reviewed-by: farcaller

farcaller added a commit that referenced this pull request Jul 13, 2014

Merge pull request #96 from errordeveloper/pt_error_handling
Added error handling in PT::Builder

@farcaller farcaller merged commit df196ce into hackndev:master Jul 13, 2014

1 of 2 checks passed

default some tests failed
Details
continuous-integration/travis-ci The Travis CI build passed
Details
@bharrisau

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2014

@errordeveloper Can you please get in the habit of using "r?" to request a review. "r=" may end up confusing the buildbot.

@errordeveloper

This comment has been minimized.

Copy link
Member Author

commented Jul 13, 2014

np. Wasn't sure which one to use ;)
On 14 Jul 2014 00:51, "Ben Harris" notifications@github.com wrote:

@errordeveloper https://github.com/errordeveloper Can you please get in
the habit of using "r?" to request a review. "r=" may end up confusing the
buildbot.

Reply to this email directly or view it on GitHub
#96 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.