Skip to content

Commit

Permalink
[TASK] Clarify hint about doctrine exceptions (#5212)
Browse files Browse the repository at this point in the history
Resolves: #1407
  • Loading branch information
lolli42 authored Jan 16, 2025
1 parent 4bb7b81 commit ae524e2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Documentation/ApiOverview/Database/TipsAndTricks/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ Various tips and tricks
$result = $queryBuilder->executeQuery();
* Doctrine DBAL throws exceptions if something goes wrong when calling
:ref:`executeQuery() <database-query-builder-execute-query>` or
:ref:`executeStatement() <database-query-builder-execute-statement>`. 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() <database-query-builder-count>` query types using the
:ref:`query builder <database-query-builder>` normally call
Expand Down

0 comments on commit ae524e2

Please sign in to comment.