Automattic\WooCommerce\Vendor\GraphQL\Utils

LazyException{}WC 1.0

Allows lazy calculation of a complex message when the exception is used in assert().

Хуков нет.

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

$LazyException = new LazyException();
// use class methods

Методы

  1. public __construct(callable $makeMessage)

Код LazyException{} WC 11.0.1

class LazyException extends \Exception
{
    /** @param callable(): string $makeMessage */
    public function __construct(callable $makeMessage)
    {
        parent::__construct($makeMessage());
    }
}