Bug #99912
closedProductionExceptionHandler does not handle CLI Exceptions
100%
Description
When i call a command like ./typo3/sysext/core/bin/typo3 delete:records and it fires an Exception, then i would expect that is handled with \TYPO3\CMS\Core\Error\ProductionExceptionHandler.
Currently it is catched, because \Symfony\Component\Console\Application::$catchExceptions is true and handled by the Symfonys ConsoleErrorEvent.
The Event is dispatched by SymfonyEventDispatcher (not TYPO3 EventDispatcher), but it is not configured (has no listener), so nothing happens when you listen on the event.
Possible solution:
Set \Symfony\Component\Console\Application::setCatchExceptions(false)
Updated by Gerrit Code Review almost 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77816
Updated by Gerrit Code Review almost 2 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77816
Updated by Christoph Lehmann over 1 year ago
- Related to Bug #100059: Events dispatched by Symfony EventDispatcher are not dispatched to TYPO3 listeners any more added
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77816
Updated by Christoph Lehmann over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e9fe4ea4265cd0a1abea09f9037848d903f45f61.
Updated by Torben Hansen over 1 year ago
- Related to Bug #99493: On CLI no exceptions are logged added
Updated by Torben Hansen over 1 year ago
- Related to Bug #100871: Common symfony command exceptions should not be thrown added