diff --git a/src/Illuminate/Queue/QueueManager.php b/src/Illuminate/Queue/QueueManager.php index 624836637c02..162b951d14a6 100755 --- a/src/Illuminate/Queue/QueueManager.php +++ b/src/Illuminate/Queue/QueueManager.php @@ -148,11 +148,17 @@ public function connection($name = null) * * @param string $name * @return \Illuminate\Contracts\Queue\Queue + * + * @throws \InvalidArgumentException */ protected function resolve($name) { $config = $this->getConfig($name); + if (is_null($config)) { + throw new InvalidArgumentException("The [{$name}] queue connection has not been configured."); + } + return $this->getConnector($config['driver']) ->connect($config) ->setConnectionName($name);