Skip to content

Commit

Permalink
Fixed Exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
freestream committed May 26, 2020
1 parent 3f6a964 commit 31615a2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Helper/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ public function add(string $worker, array $payload = [], array $options = []) :?
$config = $this->_workerConfig->getWorkerConfigById($worker);

if (null === $config) {
throw new NoSuchEntityException("Unable to find worker with name {$worker}");
$message = __(
'Unable to find worker with name %workder',
['worker' => $worker]
);

throw new NoSuchEntityException($message);
}

$byRecurring = (bool) $this->_arrHelper->get('by_recurring', $options, false);
Expand All @@ -137,7 +142,7 @@ public function add(string $worker, array $payload = [], array $options = []) :?
$this->_validateOptions($options);

if (!is_string($identity)) {
throw new InputException('Identity needs to be of type string');
throw new InputException(__('Identity needs to be of type string'));
}

$delay = $this->_arrHelper->get('delay', $options, null);
Expand Down

0 comments on commit 31615a2

Please sign in to comment.