class SS_HTTPResponse_Exception extends Exception (View source)

A SS_HTTPResponse encapsulated in an exception, which can interrupt the processing flow and be caught by the RequestHandler and returned to the user.

Example Usage:

throw new SS_HTTPResponse_Exception('This request was invalid.', 400);
throw new SS_HTTPResponse_Exception(new SS_HTTPResponse('There was an internal server error.', 500));

Properties

protected SS_HTTPResponse $response

Methods

public
__construct($body = null, int $statusCode = null, string $statusDescription = null)

No description

public
getResponse()

No description

public
setResponse(SS_HTTPResponse $response)

No description

Details

__construct($body = null, int $statusCode = null, string $statusDescription = null)

No description

Parameters

$body
int $statusCode
string $statusDescription

See also

SS_HTTPResponse::__construct

SS_HTTPResponse getResponse()

No description

Return Value

SS_HTTPResponse

setResponse(SS_HTTPResponse $response)

No description

Parameters

SS_HTTPResponse $response