/** * Constructor * * @param string|array $message The error message. * @param int $code The error code. */ public function __construct($message, $code = 500) { if (is_array($message)) { $message += array('enabled' => true); } parent::__construct($message, $code); }
public function __construct($message, $code = 404, Exception $previous = null) { parent::__construct($message, $code, $previous); }
/** * Generic handler for the internal framework errors CakePHP can generate. * * @param CakeException $error The exception to render. * * @return void */ protected function _primerError(PrimerException $error) { $url = $this->controller->request->here(); $code = $error->getCode() >= 400 && $error->getCode() < 506 ? $error->getCode() : 500; $this->controller->response->setStatusCode($code); $this->controller->set(array('code' => $code, 'title' => $error->getMessage(), 'name' => $error->getMessage(), 'message' => $error->getMessage(), 'url' => $url, 'error' => $error, '_serialize' => array('code', 'name', 'message', 'url'))); $this->controller->set($error->getAttributes()); $this->_outputMessage($this->template); }
public function __construct($message, $code = 404) { parent::__construct($message, $code); }