Automattic\WooCommerce\Caching

CacheException::__constructpublicWC 1.0

Creates a new instance of the class.

Method of the class: CacheException{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

CacheException::__construct() code WC 10.3.6

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 );
}