Requests_Exception_()

最后更新于:2021-11-26 02:45:19

Requests_Exception_( string|null$reason=null, mixed$data=null)

Create a new exception

参数

$reason

(string|null) (Optional) Reason phrase

Default value: null

$data

(mixed) (Optional) Associated data

Default value: null

源文件

文件: gc-includes/Requests/Exception/HTTP.php

	public function __construct($reason = null, $data = null) {
		if ($reason !== null) {
			$this->reason = $reason;
		}

		$message = sprintf('%d %s', $this->code, $this->reason);
		parent::__construct($message, 'httpresponse', $data, $this->code);
	}