/** * Constructor with translation support. * * @param int $status HTTP error status. * @param string $message Optional error message. Will be translated if * provided. * @param string[] $tArgs Additional args for translation. * * @since 0.1.0 */ public function __construct($status, $message = null, $tArgs = array()) { if ($message !== null) { $message = \Yii::t('http-errors', $message, $tArgs); } parent::__construct($status, $message, 0); }
public function __construct($message, $code = 500, $extra = "") { parent::__construct($code, $message); $this->code = $code; $this->extra = $extra; }
/** * @param $status * @param null $message * @param int $code * * @return HttpException */ public function __construct($status = '', $message = null, $code = 0) { $status = $status ? $status : ''; Craft::log(($status ? $status . ' - ' : '') . $message, LogLevel::Warning); parent::__construct($status, $message, $code); }
public function __construct($code = 403, $message = "Доступ запрещён!") { parent::__construct($code, $message); }
/** * Constructor. * @param integer $status HTTP status code, such as 404, 500, etc. * @param string $message error message * @param integer $code error code */ public function __construct($message = null, $code = 0) { parent::__construct(200, $message, $code); }
public function __construct() { parent::__construct(404, Yii::t('Exceptions', 'The requested page does not exist')); }
public function __construct($code) { //303是HTTP标准的see other error错误码 //通过它的message返回详情业务错误码 parent::__construct(403, $code, 0); }
public function __construct() { parent::__construct(400, Yii::t('Exceptions', 'Invalid request')); }