Automattic\WooCommerce\Caching

CacheException::__toString()publicWC 1.0

Get a string representation of the exception object.

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

No Hooks.

Return

String. String representation of the exception object.

Usage

$CacheException = new CacheException();
$CacheException->__toString(): string;

Code of CacheException::__toString() WC 7.1.0

public function __toString(): string {
	$cached_id_part = $this->cached_id ? ", id: {$this->cached_id}" : '';
	return "CacheException: [{$this->thrower->get_object_type()}{$cached_id_part}]: {$this->message}";
}