Свойство | Тип | Описание | |
---|---|---|---|
$code | Error code. | ||
$description | Error description. | ||
$errors | Additional error messages. Useful if you wish to return a validation error, this can be used to store errors per-field. | ||
$message | Error message. | ||
$responseCode | Http response code that should be send with the error. Default is 404. |
Метод | Описание | |
---|---|---|
__construct ( string $message, string $description = '', string $code = '', integer $responseCode = 404 ) | Base constructor. | |
addError ( array $error ) | Add an additional error to the exception. | |
getErrorCode ( ) : string | Get error code. | |
getErrorDescription ( ) : string | Get error description. | |
getErrorMessage ( ) : string | Get the error message. | |
getErrors ( ) : array | Get the list of all additional errors. | |
getResponseCode ( ) : integer | ||
setResponseCode ( $responseCode ) |
public __construct ( string $message, string $description = '', string $code = '', integer $responseCode = 404 ) | ||
$message | string | Error message. |
$description | string | Error description. |
$code | string | Error code. |
$responseCode | integer | Http response code that should be send with the error. Default is 404. |
public getErrorDescription ( ) : string | ||
Результат | string |
public getErrorMessage ( ) : string | ||
Результат | string |
public getResponseCode ( ) : integer | ||
Результат | integer | Returns the http response code. |
public setResponseCode ( $responseCode ) | ||
$responseCode | Http response code that should be send with the error. Default is 404. |
protected $errors |