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

InvalidGenerationSourceError.toString() method may throw #379

Closed
samogot opened this issue Sep 18, 2018 · 1 comment
Closed

InvalidGenerationSourceError.toString() method may throw #379

samogot opened this issue Sep 18, 2018 · 1 comment
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@samogot
Copy link

samogot commented Sep 18, 2018

InvalidGenerationSourceError.toString() method may throw, and that ruin whole reason of this error.

See google/json_serializable.dart#315 for details

Although root problem in this case is probably in analyzer package or whatever else initializes nameOffset as -1, it might make sense to catch possible errors around spanForElement call and output only file name if exact span is unavailable for whatever reason.

@samogot
Copy link
Author

samogot commented Sep 18, 2018

CC @jakemac53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants