You are here

public function AuthcacheP13nRequestException::__construct in Authenticated User Page Caching (Authcache) 7.2

Construct a new request exception.

Parameters

string $message: The error message (e.g., Not Found).

int $code: A HTTP status code (e.g., 404).

Exception $previous: The original exception which caused this failure.

3 calls to AuthcacheP13nRequestException::__construct()
AuthcacheP13nRequestAccessDenied::__construct in modules/authcache_p13n/includes/AuthcacheP13nRequestAccessDenied.inc
Construct a new access denied exception.
AuthcacheP13nRequestInvalidInput::__construct in modules/authcache_p13n/includes/AuthcacheP13nRequestInvalidInput.inc
Construct a 400 request exception.
AuthcacheP13nRequestNotFound::__construct in modules/authcache_p13n/includes/AuthcacheP13nRequestNotFound.inc
Construct new 404 not found exception.
3 methods override AuthcacheP13nRequestException::__construct()
AuthcacheP13nRequestAccessDenied::__construct in modules/authcache_p13n/includes/AuthcacheP13nRequestAccessDenied.inc
Construct a new access denied exception.
AuthcacheP13nRequestInvalidInput::__construct in modules/authcache_p13n/includes/AuthcacheP13nRequestInvalidInput.inc
Construct a 400 request exception.
AuthcacheP13nRequestNotFound::__construct in modules/authcache_p13n/includes/AuthcacheP13nRequestNotFound.inc
Construct new 404 not found exception.

File

modules/authcache_p13n/includes/AuthcacheP13nRequestException.inc, line 22
Defines base class for request exceptions.

Class

AuthcacheP13nRequestException
Defines base class for request exceptions.

Code

public function __construct($message = NULL, $code = NULL, Exception $previous = NULL) {
  if ($message === NULL) {
    $message = '500 Internal Server Error';
  }
  if ($code === NULL) {
    $code = intval($message);
  }
  parent::__construct($message, $code, $previous);
}