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

Optionally return more detailed exception messages when SQL statements fail #87

Merged
merged 1 commit into from
Apr 26, 2018

Conversation

DavidGregory084
Copy link
Contributor

@p14n @kutchar I'm interested in your opinions on this one

@DavidGregory084 DavidGregory084 requested a review from p14n November 7, 2017 18:25
@codecov-io
Copy link

codecov-io commented Nov 7, 2017

Codecov Report

Merging #87 into master will increase coverage by 0.15%.
The diff coverage is 56.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
+ Coverage   81.63%   81.78%   +0.15%     
==========================================
  Files          43       43              
  Lines        1127     1142      +15     
  Branches       98      107       +9     
==========================================
+ Hits          920      934      +14     
- Misses        207      208       +1
Impacted Files Coverage Δ
...lest/src/main/scala/sqlest/executor/Database.scala 68.87% <56.25%> (+2.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca7af9f...f40a58f. Read the comment docs.

@kutchar
Copy link
Contributor

kutchar commented Nov 7, 2017

@DavidGregory084 I like it! The only comment would be that verboseExceptions should probably be called wrapExceptions since you're basically wrapping the exception in a SqlestException, no?

@DavidGregory084
Copy link
Contributor Author

Yep, that sounds reasonable to me 👍

@kutchar
Copy link
Contributor

kutchar commented Nov 7, 2017

What would be even better if we added a sql exception translation layer, similar to Spring DAO instead of only returning SqlestExceptions

See:
SQLErrorCodeSQLExceptionTranslator
SQLExceptionSubclassTranslator
SQLStateSQLExceptionTranslator

@DavidGregory084
Copy link
Contributor Author

I'm going to merge this as-is as I don't think I will have a chance to look at error code mappings any time soon, hope that's ok

@DavidGregory084 DavidGregory084 merged commit 4e17189 into master Apr 26, 2018
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