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

Use Throwable.initCause() to improve error reporting

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.3.1.4
    • 10.3.1.4
    • JDBC, Miscellaneous
    • None

    Description

      As Derby has moved to J2SE 1.4, Throwable.initCause() can now be used to improve error reporting.
      As stated in the initial commit (that was backed out, see below):
      'Set Throwable.initCause() in a couple of locations at the JDBC level where we setup nested SQLExceptions.
      This means that automatically the stack trace for a database failed to start includes the reason
      for the failure, rather than just "see next exception". This is a great help when running
      JUnit tests and getting failures to start a database.'

      The initial commit was backed out because it broke numerous tests under JDK 1.6, and the author indicated he had no time to investigate.
      The patch caused no failures when running the tests with Java SE 5.0.

      Attachments

        1. standardexception.stat
          0.7 kB
          Knut Anders Hatlen
        2. standardexception.diff
          8 kB
          Knut Anders Hatlen
        3. setStackTrace-v2.diff
          5 kB
          Knut Anders Hatlen
        4. setStackTrace.diff
          3 kB
          Knut Anders Hatlen
        5. setnext2.diff
          3 kB
          Knut Anders Hatlen
        6. setnext.stat
          0.3 kB
          Knut Anders Hatlen
        7. setnext.diff
          3 kB
          Knut Anders Hatlen
        8. seenext.stat
          0.1 kB
          Knut Anders Hatlen
        9. seenext.diff
          3 kB
          Knut Anders Hatlen
        10. initCause2.stat
          0.2 kB
          Knut Anders Hatlen
        11. initCause2.diff
          3 kB
          Knut Anders Hatlen
        12. initCause.stat
          0.5 kB
          Knut Anders Hatlen
        13. initCause.diff
          12 kB
          Knut Anders Hatlen
        14. embedsqlexception.stat
          0.4 kB
          Knut Anders Hatlen
        15. embedsqlexception.diff
          6 kB
          Knut Anders Hatlen
        16. derby-2472_initial_patch.diff
          0.9 kB
          Kristian Waagan

        Activity

          People

            knutanders Knut Anders Hatlen
            kristwaa Kristian Waagan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: