| 1 | <?php |
||
| 8 | class ApiResponseException extends \RuntimeException |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Errors in the API response. |
||
| 12 | * |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $errors = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor. |
||
| 19 | * |
||
| 20 | * @param string $message The error message. |
||
| 21 | * @param array $errors The errors in the API response. |
||
| 22 | * @param \Exception $previous Previous exception. |
||
| 23 | * @param integer $code The error code. |
||
| 24 | */ |
||
| 25 | 18 | public function __construct($message, array $errors = [], \Exception $previous = null, $code = 0) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Get the errors in the API response. |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public function getErrors() |
||
| 41 | } |
||
| 42 |