wordpress / latest / classes / requests_exception / __construct.html

Requests_Exception::__construct( string $message, string $type, mixed $data = null, integer $code )

Create a new exception

Parameters

$message string Required
Exception message
$type string Required
Exception type
$data mixed Optional
Associated data

Default: null

$code integer Required
Exception numerical code, if applicable

Source

File: wp-includes/Requests/Exception.php. View all references

public function __construct($message, $type, $data = null, $code = 0) {
	parent::__construct($message, $code);

	$this->type = $type;
	$this->data = $data;
}

Used By

Used By Description

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_exception/__construct