class EnforcedResponseException extends Exception (View source)

Custom exception to break out of the main request and enforce a response.

Properties

protected Response $response

The response to be enforced.

Methods

__construct(Response $response, string $message = "", int $code = 0, Exception $previous = NULL)

Constructs a new enforced response exception.

getResponse()

Return the response to be enforced.

Details

__construct(Response $response, string $message = "", int $code = 0, Exception $previous = NULL)

Constructs a new enforced response exception.

Parameters

Response $response

The response to be enforced.

string $message

(optional) The exception message.

int $code

(optional) A user defined exception code.

Exception $previous

(optional) The previous exception for nested exceptions

getResponse()

Return the response to be enforced.