WpOrg\Requests
Exception::__construct
Create a new exception
Method of the class: Exception{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Exception = new Exception(); $Exception->__construct( $message, $type, $data, $code );
- $message(string) (required)
- Exception message.
- $type(string) (required)
- Exception type.
- $data(mixed)
- Associated data.
Default:null - $code(int)
- Exception numerical code, if applicable.
Exception::__construct() Exception:: construct code WP 7.0
public function __construct($message, $type, $data = null, $code = 0) {
parent::__construct($message, $code);
$this->type = $type;
$this->data = $data;
}