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

try to ensure all errors use spans #444

Closed
graydon opened this issue Jun 1, 2011 · 5 comments
Closed

try to ensure all errors use spans #444

graydon opened this issue Jun 1, 2011 · 5 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@graydon
Copy link
Contributor

graydon commented Jun 1, 2011

We have a bunch of cases of sess.err in the code that ought to be sess.span_err -- that is, they should carry a source position indicating the origin of the error. Fix these.

@lkuper
Copy link
Contributor

lkuper commented Jun 2, 2011

I could only find one instance of sess.err that should have been sess.span_err, which I just committed a fix for. Otherwise, instances of ".err" are either invocations of the err method on a parser or reader object, which already use span_err, or they're errors along the lines of "multiple main fns defined" or "no input filename given", for which span doesn't make sense. See anything I missed?

@brson
Copy link
Contributor

brson commented Jun 2, 2011

There are also plenty of places that just use fail directly and should be using span_err. I know extfmt does this.

@lkuper
Copy link
Contributor

lkuper commented Jun 3, 2011

Should we have a policy that every fail should be replaced by a sess.span_err (or sess.unimpl or sess.bug)?

brson added a commit that referenced this issue Jun 4, 2011
brson added a commit that referenced this issue Jun 4, 2011
@brson
Copy link
Contributor

brson commented Jun 4, 2011

lkuper: I think so

brson added a commit that referenced this issue Jun 4, 2011
lkuper added a commit that referenced this issue Jun 5, 2011
sess.span_err instead of 'fail'.  (issue #444)
paulstansifer pushed a commit to paulstansifer/rust that referenced this issue Jun 9, 2011
paulstansifer pushed a commit to paulstansifer/rust that referenced this issue Jun 9, 2011
paulstansifer pushed a commit to paulstansifer/rust that referenced this issue Jun 9, 2011
paulstansifer pushed a commit to paulstansifer/rust that referenced this issue Jun 9, 2011
paulstansifer pushed a commit to paulstansifer/rust that referenced this issue Jun 9, 2011
@brson
Copy link
Contributor

brson commented Mar 5, 2012

I can't find any fatal's or errors that should have spans but don't

@brson brson closed this as completed Mar 5, 2012
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
kazcw pushed a commit to kazcw/rust that referenced this issue Oct 23, 2018
This is already included with the regular stability attributes, and some of this is now stable, while some of it is not.
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this issue Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants