/usr/share/php/kohana3.1/system/classes/kohana/http/exception.php is in libkohana3.1-core-php 3.1.5-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <?php defined('SYSPATH') OR die('No direct script access.');
class Kohana_HTTP_Exception extends Kohana_Exception {
/**
* @var int http status code
*/
protected $_code = 0;
/**
* Creates a new translated exception.
*
* throw new Kohana_Exception('Something went terrible wrong, :user',
* array(':user' => $user));
*
* @param string $message status message, custom content to display with error
* @param array $variables translation variables
* @param integer $code the http status code
* @return void
*/
public function __construct($message = NULL, array $variables = NULL, $code = 0)
{
if ($code == 0)
{
$code = $this->_code;
}
if ( ! isset(Response::$messages[$code]))
throw new Kohana_Exception('Unrecognized HTTP status code: :code . Only valid HTTP status codes are acceptable, see RFC 2616.', array(':code' => $code));
parent::__construct($message, $variables, $code);
}
} // End Kohana_HTTP_Exception
|