| 1 | <?php |
||
| 7 | abstract class ApiException extends HttpException |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The HTTP status code. |
||
| 11 | * |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | protected $statusCode = 500; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The error code used for API responses. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $errorCode = 'error_occurred'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Constructor. |
||
| 25 | * |
||
| 26 | * @param mixed $message |
||
| 27 | */ |
||
| 28 | public function __construct( $message = null ) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the HTTP status code, |
||
| 35 | * |
||
| 36 | * @return int |
||
| 37 | */ |
||
| 38 | public function getStatusCode() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the error code. |
||
| 45 | * |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getErrorCode() |
||
| 52 | } |