This repository was archived by the owner on Nov 9, 2022. It is now read-only.
File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 3
3
namespace Kutny \TracyBundle ;
4
4
5
5
use Exception ;
6
+ use Symfony \Component \Console \Event \ConsoleExceptionEvent ;
6
7
use Symfony \Component \HttpFoundation \Response ;
7
8
use Symfony \Component \HttpKernel \Event \GetResponseForExceptionEvent ;
8
9
use Symfony \Component \HttpKernel \Exception \AccessDeniedHttpException ;
@@ -24,6 +25,13 @@ public function onKernelException(GetResponseForExceptionEvent $event)
24
25
}
25
26
}
26
27
28
+ public function onConsoleException (ConsoleExceptionEvent $ event )
29
+ {
30
+ $ exception = $ event ->getException ();
31
+
32
+ Debugger::log ($ exception , Debugger::ERROR );
33
+ }
34
+
27
35
private function isNotFoundException (Exception $ exception )
28
36
{
29
37
return $ exception instanceOf NotFoundHttpException;
Original file line number Diff line number Diff line change 7
7
<services >
8
8
<service id =" kutny_tracy_kernel_exception_listener" class =" Kutny\TracyBundle\KernelExceptionListener" >
9
9
<tag name =" kernel.event_listener" event =" kernel.exception" method =" onKernelException" />
10
+ <tag name =" kernel.event_listener" event =" console.exception" method =" onConsoleException" />
10
11
</service >
11
12
</services >
12
13
</container >
You can’t perform that action at this time.
0 commit comments