Yoast\WP\SEO\Exceptions\Locking

Lock_Timeout_Exception{}Yoast 1.0└─ RuntimeException

Exception for when a lock cannot be acquired within the allowed number of attempts.

Хуков нет.

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

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

Методы

  1. public __construct( string $lock_key, int $attempts )

Код Lock_Timeout_Exception{} Yoast 27.7

class Lock_Timeout_Exception extends RuntimeException {

	/**
	 * The constructor.
	 *
	 * @param string $lock_key The lock key that could not be acquired.
	 * @param int    $attempts The number of attempts made.
	 */
	public function __construct( string $lock_key, int $attempts ) {
		parent::__construct( "Failed to acquire lock '{$lock_key}' after {$attempts} attempts." );
	}
}