Menu

#1652 Improve exception chaining

version 2.5.x
open-fixed
None
5
2022-06-03
2022-06-03
No

There are a few places in the code where an HsqlException is thrown due to another exception, but the root cause isn't chained. That makes the issues more difficult to debug.

Here is a patch changing the calls to Error.error() to include the root cause:
https://github.com/ebourg/hsqldb/commit/efc3920a05b40536e0a60752c99200b579c82729
https://github.com/ebourg/hsqldb/commit/efc3920a05b40536e0a60752c99200b579c82729.patch

And there are a few IOException and SQLException that could be chained as well:
https://github.com/ebourg/hsqldb/commit/d5ae7c669f899120c567fb6cad5eba59aba6a16c
https://github.com/ebourg/hsqldb/commit/d5ae7c669f899120c567fb6cad5eba59aba6a16c.patch

Discussion

  • Fred Toussi

    Fred Toussi - 2022-06-03
    • status: open --> pending-accepted
    • assigned_to: Fred Toussi
     
  • Fred Toussi

    Fred Toussi - 2022-06-03

    Thanks for the patch. It looks fine and will be applied to trunk shortly.

     
  • Fred Toussi

    Fred Toussi - 2022-06-03
    • status: pending-accepted --> open-fixed
     
  • Fred Toussi

    Fred Toussi - 2022-06-03

    committed to SVN /base/trunk. In a few places, changed to error(e, code, e.getMessage()) as it is necessary to include the root cause message in the SQL exception message.

     
  • Emmanuel Bourg

    Emmanuel Bourg - 2022-06-03

    Thank you

     

Log in to post a comment.