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

Throwing SQLException in QueryExecutionListener #62

Open
whiskeysierra opened this issue Nov 26, 2019 · 2 comments
Open

Throwing SQLException in QueryExecutionListener #62

whiskeysierra opened this issue Nov 26, 2019 · 2 comments

Comments

@whiskeysierra
Copy link

The methods in QueryExecutionListener don't allow to throw SQLException right now. Unfortunately almost all methods in the Statement (as part of ExecutionInfo) declare to throw SQLException when being invoked.

From what I can tell it should be safe to allow SQLException to be thrown there since all methods in Statement and PreparedStatement that invoke the listener allow to throw SQLException as well.

@ttddyy
Copy link
Member

ttddyy commented Nov 27, 2019

hm, what is the use case for throwing such exception or invoking statement in query listener?
If you happen to perform some operations on statement in listener, I think it's better to handle exceptions there? Otherwise, it may be confusing whether an exception is coming from the original invocation vs the one from listener.

@whiskeysierra
Copy link
Author

whiskeysierra commented Nov 28, 2019 via email

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

No branches or pull requests

2 participants