Project

General

Profile

Actions

Task #87852

closed

Pass original DBALException along with SqlErrorException

Added by Christian Futterlieb over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2019-03-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

Description

When a TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\SqlErrorException is thrown, register the previous exception as 3rd parameter to the exception's constructor:

try {
    $this->connectionPool->getConnectionForTable($tableName)->update($tableName, $fieldValues, $where);
} catch (DBALException $e) {
    throw new SqlErrorException($e->getPrevious()->getMessage(), 1470230768, $e);
}

Like this, it is possible to determine, what exactly went wrong and then for example re-try, log or do something else. I'll submit that tiny patch in a minute.

Note: I set TYPO3 version to '10', but I'd like to add this to 9.5 and 8.7 too.

Actions #1

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59888

Actions #2

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59888

Actions #3

Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59961

Actions #4

Updated by Christian Futterlieb over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions #6

Updated by Gerrit Code Review over 5 years ago

  • Status changed from Closed to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59960

Actions #7

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59961

Actions #8

Updated by Christian Futterlieb over 5 years ago

  • Status changed from Under Review to Resolved
Actions #9

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF