Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6484

Include SQLState in client exception messages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.11.1.1
    • 10.11.1.1
    • Network Client
    • None

    Description

      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.

      Attachments

        1. d6484-1a.diff
          3 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: