You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
I want to get some metadata from the statement (via connection and then
metadata) but all methods in JDBC throw SQLException.
Other than swallowing, how else could I possibly handle those exceptions?
If it's not intended to call anything on the statement, why is it passed to
the listener then?
On Thu, 28 Nov 2019, 00:15 Tadaya Tsuyukubo, ***@***.***> wrote:
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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#62>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADI7HJFAWS3DDFONFDRARTQV35PLANCNFSM4JRT7EEQ>
.
The methods in
QueryExecutionListener
don't allow to throwSQLException
right now. Unfortunately almost all methods in theStatement
(as part ofExecutionInfo
) declare to throwSQLException
when being invoked.From what I can tell it should be safe to allow
SQLException
to be thrown there since all methods inStatement
andPreparedStatement
that invoke the listener allow to throwSQLException
as well.The text was updated successfully, but these errors were encountered: