From b91d6bd4d3f7ae886cecb3ca8b2792c7c7611fac Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Wed, 15 Jan 2025 13:46:14 +0100 Subject: [PATCH] [TASK] Clarify hint about doctrine exceptions Resolves: #1407 --- .../ApiOverview/Database/TipsAndTricks/Index.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Documentation/ApiOverview/Database/TipsAndTricks/Index.rst b/Documentation/ApiOverview/Database/TipsAndTricks/Index.rst index 3624762002..2542c14c16 100644 --- a/Documentation/ApiOverview/Database/TipsAndTricks/Index.rst +++ b/Documentation/ApiOverview/Database/TipsAndTricks/Index.rst @@ -42,13 +42,12 @@ Various tips and tricks $result = $queryBuilder->executeQuery(); -* Doctrine DBAL throws exceptions if something goes wrong when calling - :ref:`executeQuery() ` or - :ref:`executeStatement() `. The - exception type is :php:`\Doctrine\DBAL\Exception`, which can be caught and - transferred to a better error message if the application should expect - query errors. Note that this is not good habit and often indicates an - architectural flaw in the application at a different layer. +* Doctrine DBAL throws exceptions if something goes wrong when calling API methods. + The exception type is :php:`\Doctrine\DBAL\Exception`. Typical extensions should + usually not catch such exceptions but let it bubble up to be handled by the + global TYPO3 core error and exception handling: They most often indicate a + broken connection, database schema or programming error and extensions should + usually not try to hide away or escalate them on their own. * :php:`count() ` query types using the :ref:`query builder ` normally call