| Total Complexity | 4 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ApiInternalCallException extends \RuntimeException |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var Response |
||
| 11 | */ |
||
| 12 | protected $response; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $exceptionMessage; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var \Exception |
||
| 21 | */ |
||
| 22 | protected $previousException; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param Response $response |
||
| 26 | * @param string $message |
||
| 27 | */ |
||
| 28 | public function __construct(Response $response, $message = 'There was an error while processing your request') |
||
| 29 | { |
||
| 30 | $this->response = $response; |
||
| 31 | $this->exceptionMessage = $message; |
||
| 32 | $this->message = $message; |
||
| 33 | $this->previousException = $response->exception; |
||
|
|
|||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return Response |
||
| 38 | */ |
||
| 39 | public function getResponse() |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getExceptionMessage() |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return \Exception |
||
| 54 | */ |
||
| 55 | public function getPreviousException() |
||
| 61 |