Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| AblyRequestException | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| getResponse | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Ably\Exceptions; |
| 3 | |
| 4 | /** |
| 5 | * Exception thrown when a request to Ably API fails (HTTP response other than 200 or 201) |
| 6 | */ |
| 7 | class AblyRequestException extends AblyException { |
| 8 | |
| 9 | protected $response; |
| 10 | |
| 11 | public function __construct( $message, $code, $statusCode, $response = null ) { |
| 12 | parent::__construct( $message, $code, $statusCode ); |
| 13 | |
| 14 | $this->response = $response ? : [ 'headers' => '', 'body' => '' ]; |
| 15 | } |
| 16 | |
| 17 | public function getResponse() { |
| 18 | return $this->response; |
| 19 | } |
| 20 | } |