Skip to content

Make hot mode a little less aggressive about catching errors. - #8743

Merged
Hixie merged 1 commit into
flutter:masterfrom
Hixie:tool_crash
Mar 13, 2017
Merged

Hixie merged 1 commit into
flutter:masterfrom
Hixie:tool_crash

Conversation

@Hixie

@Hixie Hixie commented Mar 13, 2017

Copy link
Copy Markdown
Contributor

It was resulting in weird situations where the tool would dump an
error message and stack but not quit, or would fail hard but then just
hang.

Instead, specifically catch errors you expect. As an example of this,
there's one error we expect from the DartDependencySetBuilder, so we
catch that one, turn it into a dedicated exception class, then in the
caller catch that specific exception.

@Hixie

Hixie commented Mar 13, 2017

Copy link
Copy Markdown
Contributor Author

cc @johnmccutchan

This is a minor step towards fixing #8742.

@johnmccutchan

Copy link
Copy Markdown
Contributor

LGTM

@Hixie
Hixie force-pushed the tool_crash branch 6 times, most recently from 3d76a23 to 6cfb100 Compare March 13, 2017 21:10
@Hixie

Hixie commented Mar 13, 2017

Copy link
Copy Markdown
Contributor Author

Fixed the TODO that I'd left, and caught some other errors that the dependency checker might run into.

@johnmccutchan

Copy link
Copy Markdown
Contributor

@Hixie Can we add tests?

@Hixie

Hixie commented Mar 13, 2017

Copy link
Copy Markdown
Contributor Author

Yup, I was already on it. :-)

@Hixie
Hixie force-pushed the tool_crash branch 2 times, most recently from 95d931a to 36b5557 Compare March 13, 2017 21:34
@Hixie

Hixie commented Mar 13, 2017

Copy link
Copy Markdown
Contributor Author

ok PTAL. Now with some testing and more user-friendly behaviour.

@johnmccutchan

Copy link
Copy Markdown
Contributor

LGTM

It was resulting in weird situations where the tool would dump an
error message and stack but not quit, or would fail hard but then just
hang.

Instead, specifically catch errors you expect. As an example of this,
there's one error we expect from the DartDependencySetBuilder, so we
catch that one, turn it into a dedicated exception class, then in the
caller catch that specific exception.
@Hixie
Hixie merged commit 0edc4d2 into flutter:master Mar 13, 2017
@Hixie
Hixie deleted the tool_crash branch March 13, 2017 21:50
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants