diff --git a/core/lib/Drupal/Core/Queue/DelayedRequeueException.php b/core/lib/Drupal/Core/Queue/DelayedRequeueException.php index 2f402fedb5..93b6c82c35 100644 --- a/core/lib/Drupal/Core/Queue/DelayedRequeueException.php +++ b/core/lib/Drupal/Core/Queue/DelayedRequeueException.php @@ -29,12 +29,18 @@ class DelayedRequeueException extends \RuntimeException { * Constructs a DelayedRequeueException. * * @param int $delay - * The desired delay interval for this item. + * The desired delay interval for this item (in seconds). + * @param string $message + * The error message. + * @param int $code + * The error code. + * @param \Throwable|null $previous + * The previous throwable used for the exception chaining. */ - public function __construct(int $delay = 0) { - if ($delay > 0) { - $this->delay = $delay; - } + public function __construct(int $delay = 0, string $message = '', int $code = 0, \Throwable $previous = NULL) { + \assert($delay >= 0); + parent::__construct($message, $code, $previous); + $this->delay = $delay; } /**