WpOrg\Requests\Exception\Transport

Curl::__construct()publicWP 1.0

Create a new exception.

Method of the class: Curl{}

No Hooks.

Return

null. Nothing (null).

Usage

$Curl = new Curl();
$Curl->__construct( $message, $type, $data, $code );
$message(string) (required)
Exception message.
$type(string) (required)
Exception type.
$data(mixed)
Associated data, if applicable.
Default: null
$code(int)
Exception numerical code, if applicable.

Curl::__construct() code WP 6.6.2

public function __construct($message, $type, $data = null, $code = 0) {
	if ($type !== null) {
		$this->type = $type;
	}

	if ($code !== null) {
		$this->code = (int) $code;
	}

	if ($message !== null) {
		$this->reason = $message;
	}

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