Details
-
Improvement
-
Resolution: Obsolete
-
Medium
-
4.0.6, 4.1.3
-
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.