You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org> on 2006/02/03 21:59:33 UTC
[jira] Commented: (DERBY-922) getSQLException() method in
client.am.SqlException does not correctly chain exceptions
[ http://issues.apache.org/jira/browse/DERBY-922?page=comments#action_12365124 ]
Knut Anders Hatlen commented on DERBY-922:
------------------------------------------
There is a similar problem in SqlWarning.getSQLWarning().
> getSQLException() method in client.am.SqlException does not correctly chain exceptions
> --------------------------------------------------------------------------------------
>
> Key: DERBY-922
> URL: http://issues.apache.org/jira/browse/DERBY-922
> Project: Derby
> Type: Bug
> Reporter: David Van Couvering
> Assignee: David Van Couvering
>
> This was detected by Knut Anders. From his email:
> I think
>
> if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 )
> {
> sqle.initCause(getCause());
> }
>
> should have been
>
> if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 )
> {
> sqle.initCause(this);
> }
>
> It is the SqlException that is the cause of the SQLException. The
> cause of an SqlException is often null, and if we pass the null value
> to SQLException.initCause(), we lose all of the driver internal stack
> trace, and it makes debugging very difficult. All we get in the stack
> trace is SqlException.getSQLException(), the top-level JDBC method and
> the application stack.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira