| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 4 | public function getJsonRpcResponseFromException( |
|
| 35 | \Exception $exception, |
||
| 36 | JsonRpcRequest $fromRequest = null |
||
| 37 | ) : JsonRpcResponse { |
||
| 38 | 4 | $event = new ActionEvent\OnExceptionEvent($exception, $fromRequest); |
|
| 39 | 4 | $this->dispatchJsonRpcEvent($event::EVENT_NAME, $event); |
|
| 40 | |||
| 41 | 4 | return $this->responseCreator->createErrorResponse($event->getException(), $fromRequest); |
|
| 42 | } |
||
| 44 |