HttpErrorException
extends BackendException
in package
HTTP error exception.
Tags
Table of Contents
- $response : Response
- Server response.
- $tags : array<string|int, mixed>
- Tags.
- __construct() : void
- Constructor.
- addTag() : void
- Add a tag.
- createFromResponse() : RequestErrorException|RemoteErrorException
- Exception factory.
- getResponse() : Response
- Return server response.
- getTags() : array<string|int, mixed>
- Return all tags.
- hasTag() : bool
- Return true if the exception has the requested tag.
Properties
$response
Server response.
protected
Response
$response
$tags
Tags.
protected
array<string|int, mixed>
$tags
= []
Methods
__construct()
Constructor.
public
__construct(string $message, int $code, Response $response[, Exception $prev = null ]) : void
Parameters
- $message : string
-
Exception message
- $code : int
-
Exception code
- $response : Response
-
Server response
- $prev : Exception = null
-
Previous exception
Return values
void —addTag()
Add a tag.
public
addTag(string $tag) : void
Parameters
- $tag : string
-
Tag name
Return values
void —createFromResponse()
Exception factory.
public
static createFromResponse(Response $response) : RequestErrorException|RemoteErrorException
Returns a RequestErrorException or RemoteErrorException depending on the response's status code.
Parameters
- $response : Response
-
Server response
Return values
RequestErrorException|RemoteErrorException —getResponse()
Return server response.
public
getResponse() : Response
Return values
Response —getTags()
Return all tags.
public
getTags() : array<string|int, mixed>
Return values
array<string|int, mixed> —hasTag()
Return true if the exception has the requested tag.
public
hasTag(string $tag) : bool
Parameters
- $tag : string
-
Tag