Свойство | Тип | Описание | |
---|---|---|---|
$body | mixed | Error response body to be serialized | |
$code | integer | Error HTTP status code | |
$message | string | Error message |
Метод | Описание | |
---|---|---|
__construct ( integer $code, string $message, $body = null ) | Creates the error object and sets properties | |
get_json_error ( ) : false | string | Check for the latest JSON parsing error and return the message if any |
public __construct ( integer $code, string $message, $body = null ) | ||
$code | integer | HTTP status code |
$message | string | Error message |
public static get_json_error ( ) : false | string | ||
Результат | false | string | Returns false if no error or a string with the error detail. |