/** * Constructor. * @param string $message * @param array $vars */ public function __construct($message = '', array $vars = array()) { // Set default message if (empty($message)) { $message = __('Page not found'); } // Pass the message and integer code to the parent parent::__construct($message, $vars, 404); }
/** * Constructor. * @param string $message * @param array $vars */ public function __construct($message = '', array $vars = array()) { // Set default message if (empty($message)) { $message = __('Access forbidden'); } // Pass the message and integer code to the parent parent::__construct($message, $vars, 403); }
/** * Constructor. Throws an error returned by SQL server. * @param Database_Adapter $adapter */ public function __construct(Database_Adapter $adapter) { $this->errquery = $adapter->getLastQuery(); $this->errstr = $adapter->getErrorText(); parent::__construct($this->errstr, array(), $adapter->getErrorNo()); }