Requests_Exception_Transport_cURL::__construct() WordPress Method

The cURL transport for Requests_Exception uses the libcurl library to handle exception errors. If an error occurs during a request, this transport will attempt to find the best error message and code from the libcurl library.

Requests_Exception_Transport_cURL::__construct( $message,  $type,  $data = null,  $code ) #


Source

File: wp-includes/Requests/Exception/Transport/cURL.php

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

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

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

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.