Automattic\WooCommerce\Caching

CacheException::__toString()publicWC 1.0

Get a string representation of the exception object.

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

Хуков нет.

Возвращает

Строку. String representation of the exception object.

Использование

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

Код CacheException::__toString() WC 8.7.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}";
}