Conditions | 4 |
Paths | 6 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function onException(GetResponseForExceptionEvent $event) |
||
16 | { |
||
17 | if (method_exists($event, 'getThrowable')) { |
||
18 | $throwable = $event->getThrowable(); |
||
19 | } else { |
||
20 | // Support for Symfony 4.3 and before |
||
21 | $throwable = $event->getException(); |
||
|
|||
22 | } |
||
23 | |||
24 | if ($throwable instanceof NotValidCurrentPageException) { |
||
25 | $notFoundHttpException = new NotFoundHttpException('Page Not Found', $throwable); |
||
26 | if (method_exists($event, 'setThrowable')) { |
||
27 | $event->setThrowable($notFoundHttpException); |
||
28 | } else { |
||
29 | // Support for Symfony 4.3 and before |
||
30 | $event->setException($notFoundHttpException); |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 | |||
45 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.