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
Add additional SQLExceptions to the QueryException output #1008
Conversation
Fixes #1007 When JRE6 is used, it adds an extra Exception with additional information. When JRE7 is used, it adds the extra SQLExceptions as suppressed exceptions.
Looks good. I restarted the build, cause it got stuck. |
I also restarted the build, ah well. |
@cowwoc Is this in your opinion also ok to merge? |
The only thing that would really help, is a good test case. But in essence, the functionality is there, and since @cowwoc is probably using Java 7, he benefits fully from this pull request. |
@timowest I believe this is okay to merge. @Shredder121 My testcase, as it were, doesn't really exist anymore. I was running into such exceptions when moving code from stored procedures (DB layer) to the application layer. The code in question was removed. You could actually do something very simple (I haven't tested this but in theory it should work):
I would begin by examining what |
Yes, I like your idea of the assertions, although probably we won't test with JDK6. But I think I'll add your simple case, it constructs an Exception, with causes, so indeed, in theory it should work (although @timowest what's your take on (still) directing tests for JDK6? Is that useful? |
@Shredder121 I believe the querydsl project can't be compiled anymore with JDK6, also because of the generics issue, but a separate project that contains a dependency to querydsl could be used to test querydsl with JDK 6-8. So the requirement is runtime compatibility with JDK 6-8. |
I added combined Java 6 and 7 asserts, so it now passes correctly in both. ...well, I seem to also have mentioned a user in my commit.. |
I now added the simple exception creation case of @cowwoc, is it still necessary to check for 2 suppressed or newline separated exceptions as result? |
@Shredder121 If you didn't do this, how would you define success? |
@Shredder121 A more specific assertion is in my opinion not necessary. Is this good to merge, or is something still missing? |
With the title:
and the linked issue:
I think that the pull request does just as it says. So I think that the pull request is now good to merge. |
Add additional SQLExceptions to the QueryException output
Fine tuning can be done via further pull requests. |
Fixes #1007
When JRE6 is used, it adds an extra Exception with additional information.
When JRE7 is used, it adds the extra SQLExceptions as suppressed exceptions.