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)" <ji...@apache.org> on 2014/02/25 09:49:22 UTC

[jira] [Resolved] (DERBY-6484) Include SQLState in client exception messages

     [ https://issues.apache.org/jira/browse/DERBY-6484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-6484.
---------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.11.0.0
    Issue & fix info:   (was: Patch Available)

> 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: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.11.0.0
>
>         Attachments: d6484-1a.diff
>
>
> 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
(v6.1.5#6160)