CacheException::__construct()publicWC 1.0

Creates a new instance of the class.

Метод класса: CacheException{}

No Hooks.


null. Nothing.


$CacheException = new CacheException();
$CacheException->__construct( $message, $thrower, $cached_id, ?array $errors, $code, $previous );
$message(string) (required)
The exception message.
$thrower(ObjectCache) (required)
The object that is throwing the exception.
The involved cached object id, if available.
Default: null
?array $errors **
Default: null
An error code, if available.
The previous exception, if available.
Default: null

Code of CacheException::__construct() WC 7.1.0

public function __construct( string $message, ObjectCache $thrower, $cached_id = null, ?array $errors = null, $code = 0, \Throwable $previous = null ) {
	$this->errors    = $errors ?? array();
	$this->thrower   = $thrower;
	$this->cached_id = $cached_id;

	parent::__construct( $message, $code, $previous );