Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15039

Handle DB errors using exceptions in some cases

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Obsolete
    • Icon: Medium Medium
    • Future
    • 4.0.6, 4.1.3
    • Database related
    • None

    Description

      Some DB errors should be fatal in order to be more informative. An easy improvement would be to analyze the reason why a query fails, and depending on a known list of "fatal errors" codes, thrown the appropriate exception. This exception can then be handled correctly at a higher level.

      #1146 (unknown table) is a good example: a corrupted eZ publish instance could for instance be missing a default table, and depending on the table and the code using it, the final error may be fatal or not, understandable or not... a missing table should stop execution completely and cleanly.

      This would also help make the system more robust, as a severe error can lead to more inconsistencies.

      Attachments

        Activity

          People

            unknown unknown
            bd bd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: