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

Implement std::error::Error for ParserError #72

Merged
merged 1 commit into from
May 29, 2019
Merged

Conversation

benesch
Copy link
Contributor

@benesch benesch commented May 22, 2019

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 184

  • 0 of 5 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.06%) to 91.195%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/sqlparser.rs 0 5 0.0%
Totals Coverage Status
Change from base Build 183: 2.06%
Covered Lines: 145
Relevant Lines: 159

💛 - Coveralls

@coveralls
Copy link

coveralls commented May 22, 2019

Pull Request Test Coverage Report for Build 201

  • 0 of 7 (0.0%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 89.287%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/sqlparser.rs 0 7 0.0%
Files with Coverage Reduction New Missed Lines %
src/test_utils.rs 2 89.06%
src/sqlparser.rs 5 88.12%
Totals Coverage Status
Change from base Build 183: 0.2%
Covered Lines: 2867
Relevant Lines: 3211

💛 - Coveralls

@benesch benesch mentioned this pull request May 22, 2019
@nickolay
Copy link
Contributor

Hey @benesch, thanks for this and the other PRs!

As I understand, the point is to let the caller use ? to pass an sqlparser::ParserError, as well as any other kind of error, up the call stack as a Result<..., Box<Error>>.

The change looks good to me; a minor point (that also applies to 74 and 75) is that sqlparser is auto-formatted using rustfmt (even though sometimes the resulting formatting is sub-optimal). I think Github will let me fix it up when merging though.

@benesch
Copy link
Contributor Author

benesch commented May 26, 2019

As I understand, the point is to let the caller use ? to pass an sqlparser::ParserError, as well as any other kind of error, up the call stack as a Result<..., Box<Error>>.

Yes, that's exactly right. I've run this through cargo fmt, so should be good to merge once CI passes on the new ref.

Hey @benesch, thanks for this and the other PRs!

You are very welcome! Thanks for your maintainership of this library. :)

I meant to drop you a line in one of these PRs and it looked like it slipped my mind: the context for all this work is that I'm upstreaming patches from our internal fork at @MaterializeInc. I'm erring on the side of upstreaming everything possible, and I don't think any of it will be objectionable, but definitely let me know if you think any of it would be better left to us downstream!

@nickolay nickolay merged commit bc1ec47 into apache:master May 29, 2019
@benesch benesch deleted the error branch June 21, 2019 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants