Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.3149 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
9 | 5 | public function onKernelException(GetResponseForExceptionEvent $event) |
|
10 | { |
||
11 | 5 | $exception = $event->getException(); |
|
12 | 5 | if (!$exception instanceof \Google_Exception) { |
|
13 | 5 | return; |
|
14 | } |
||
15 | |||
16 | $jsonException = new JsonHttpException($exception->getCode(), $exception->getMessage()); |
||
17 | |||
18 | $event->setException($jsonException); |
||
19 | } |
||
20 | } |
||
21 |