File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ some existing setup for aggregating and analyzing Symfony logs.
15
15
16
16
There are basically two logging cases you would need:
17
17
* Manually logging some information from your command;
18
- * Logging not caught Exceptions.
18
+ * Logging uncaught Exceptions.
19
19
20
20
Manually logging from console command
21
21
-------------------------------------
@@ -175,7 +175,10 @@ method, where exception handling should happen::
175
175
What happens above is we disable exception catching, so that parent run method
176
176
would throw the exceptions. When exception is caught, we simple log it by
177
177
accessing the ``logger `` service from the service container and then handle
178
- the rest in the same way parent run method does that.
178
+ the rest in the same way parent run method does that (Since parent :method: `run<Symfony\\ Bundle\\ FrameworkBundle\\ Console\\ Application::run> `
179
+ method will not handle exceptions rendering and status code handling when
180
+ `catchExceptions ` is set to false, it has to be done in the overridden
181
+ method).
179
182
180
183
For our extended Application class to work properly with console shell mode
181
184
we have to do a small trick to intercept ``autoExit `` setter, and store the
You can’t perform that action at this time.
0 commit comments