Requests_Exception_HTTP_Unknown::__construct()publicWP 1.0

Create a new exception

If $data is an instance of Requests_Response{}, uses the status code from it. Otherwise, sets as 0

{} It's a method of the class: Requests_Exception_HTTP_Unknown{}

No Hooks.


null. Nothing.


$Requests_Exception_HTTP_Unknown = new Requests_Exception_HTTP_Unknown();
$Requests_Exception_HTTP_Unknown->__construct( $reason, $data );
Reason phrase
Default: null
Associated data
Default: null

Code of Requests_Exception_HTTP_Unknown::__construct() WP 6.0.1

public function __construct($reason = null, $data = null) {
	if ($data instanceof Requests_Response) {
		$this->code = $data->status_code;

	parent::__construct($reason, $data);