Project

General

Profile

Actions

Bug #99493

open

On CLI no exceptions are logged

Added by Helmut Hummel over 1 year ago. Updated 12 months ago.

Status:
New
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2023-01-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Since symfony/console catches all exceptions from commands
to render the exception, the TYPO3 exception handler is never triggered,
thus not only completely unused on CLI, but also does not log anything
to the configured logs


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #99912: ProductionExceptionHandler does not handle CLI ExceptionsResolved2023-02-09

Actions
Actions #1

Updated by Andreas Kienast about 1 year ago

The easiest solution is to set $this->application->setCatchExceptions(false); in typo3/sysext/core/Classes/Console/CommandApplication.php, with the downside that exceptions are not pretty-printed anymore in CLI.

Actions #2

Updated by Torben Hansen 12 months ago

  • Related to Bug #99912: ProductionExceptionHandler does not handle CLI Exceptions added
Actions #3

Updated by Torben Hansen 12 months ago

With #99912, setCatchExceptions(false) has been implemented. So now we have exceptions, but as afernandez wrote, this looks not very nice. I think, our ExceptionHandlers should at least try to catch/pretty print common Symfony exceptions like CommandNotFoundException and avoid throwing them.

Actions #4

Updated by Torben Hansen 12 months ago

Created a new issue for my suggestion - see #100871

Actions #5

Updated by Helmut Hummel 12 months ago

Torben Hansen wrote in #note-4:

Created a new issue for my suggestion - see #100871

Hm, ok. So now we have 3 tickets tackling the same issue? Any reasons for this? Should be maybe consolidate that somehow? Which is the ticket we want to proceed in?

Actions

Also available in: Atom PDF