db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-6484) Include SQLState in client exception messages
Date Wed, 19 Feb 2014 12:23:19 GMT
Knut Anders Hatlen created DERBY-6484:

             Summary: Include SQLState in client exception messages
                 Key: DERBY-6484
                 URL: https://issues.apache.org/jira/browse/DERBY-6484
             Project: Derby
          Issue Type: Improvement
          Components: Network Client
    Affects Versions:
            Reporter: Knut Anders Hatlen
            Priority: Minor

When the embedded driver raises an SQLException, it is linked to a iapi.error.StandardException
whose toString() method adds the SQLState to the error message. An SQLException raised by
the client driver is linked to a client.am.SqlException, which does not add the SQLState.
Because of this, printStackTrace() gives more information when called on an embedded exception.
You have to call getSQLState() on the client exception in order to see the SQLState.

We should change client.am.SqlException's toString() method to work the same way as StandardException.toString().

See also the discussion in DERBY-1997.

This message was sent by Atlassian JIRA

View raw message