@@ -42,9 +42,9 @@ public function __construct($controller, LoggerInterface $logger = null, bool $d
42
42
43
43
public function logKernelException (ExceptionEvent $ event )
44
44
{
45
- $ e = FlattenException::createFromThrowable ($ event ->getException ());
45
+ $ e = FlattenException::createFromThrowable ($ event ->getThrowable ());
46
46
47
- $ this ->logException ($ event ->getException (), sprintf ('Uncaught PHP Exception %s: "%s" at %s line %s ' , $ e ->getClass (), $ e ->getMessage (), $ e ->getFile (), $ e ->getLine ()));
47
+ $ this ->logException ($ event ->getThrowable (), sprintf ('Uncaught PHP Exception %s: "%s" at %s line %s ' , $ e ->getClass (), $ e ->getMessage (), $ e ->getFile (), $ e ->getLine ()));
48
48
}
49
49
50
50
public function onKernelException (ExceptionEvent $ event , string $ eventName = null , EventDispatcherInterface $ eventDispatcher = null )
@@ -53,7 +53,7 @@ public function onKernelException(ExceptionEvent $event, string $eventName = nul
53
53
return ;
54
54
}
55
55
56
- $ exception = $ event ->getException ();
56
+ $ exception = $ event ->getThrowable ();
57
57
$ request = $ this ->duplicateRequest ($ exception , $ event ->getRequest ());
58
58
59
59
try {
@@ -98,7 +98,7 @@ public static function getSubscribedEvents(): array
98
98
];
99
99
}
100
100
101
- protected function logException (\Exception $ exception , string $ message )
101
+ protected function logException (\Throwable $ exception , string $ message )
102
102
{
103
103
if (null !== $ this ->logger ) {
104
104
if (!$ exception instanceof HttpExceptionInterface || $ exception ->getStatusCode () >= 500 ) {
@@ -112,7 +112,7 @@ protected function logException(\Exception $exception, string $message)
112
112
/**
113
113
* Clones the request for the exception.
114
114
*/
115
- protected function duplicateRequest (\Exception $ exception , Request $ request ): Request
115
+ protected function duplicateRequest (\Throwable $ exception , Request $ request ): Request
116
116
{
117
117
$ attributes = [
118
118
'_controller ' => $ this ->controller ,
0 commit comments