* * @access private * @var */ public $headers; /** * @param int the status code to be set in the response * @param string a human readable presentation of the status code * @param array a hash of additional headers to be set in the response * * @return void */ function __construct($status = 500, $reason = NULL, $headers = array()) { if ($reason === NULL) { $reason = Trails_Response::get_reason($status); } parent::__construct($reason, $status); $this->headers = $headers; } /** * * * @param type * * @return type */ function __toString() { return "{$this->code} {$this->message}"; } } class Trails_DoubleRenderError extends Trails_Exception { function __construct() { $message = "Render and/or redirect were called multiple times in this action. ". "Please note that you may only call render OR redirect, and at most ". "once per action."; parent::__construct(500, $message); } } class Trails_MissingFile extends Trails_Exception { function __construct($message) { parent::__construct(500, $message); } } class Trails_RoutingError extends Trails_Exception { function __construct($message) { parent::__construct(400, $message); } } class Trails_UnknownAction extends Trails_Exception { function __construct($message) { parent::__construct(404, $message); } } class Trails_UnknownController extends Trails_Exception { function __construct($message) { parent::__construct(404, $message); } } class Trails_SessionRequiredException extends Trails_Exception { function __construct() { $message = "Tried to access a non existing session."; parent::__construct(500, $message); } }