function DelayedRequeueException::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Queue/DelayedRequeueException.php \Drupal\Core\Queue\DelayedRequeueException::__construct()
  2. 10 core/lib/Drupal/Core/Queue/DelayedRequeueException.php \Drupal\Core\Queue\DelayedRequeueException::__construct()

Constructs a DelayedRequeueException.

Parameters

int $delay: The desired delay interval for this item (in seconds).

string $message: The error message.

int $code: The error code.

\Throwable|null $previous: The previous throwable used for the exception chaining.

File

core/lib/Drupal/Core/Queue/DelayedRequeueException.php, line 40

Class

DelayedRequeueException
Throw this exception to leave an item in the queue until its lock expires.

Namespace

Drupal\Core\Queue

Code

public function __construct(int $delay = 0, string $message = '', int $code = 0, ?\Throwable $previous = NULL) {
    parent::__construct($message, $code, $previous);
    if ($delay > 0) {
        $this->delay = $delay;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.