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