List all available downloader types in exception message.
parent
7c1042eef5
commit
5b4a3f9e9f
|
@ -109,7 +109,7 @@ class DownloadManager
|
||||||
{
|
{
|
||||||
$type = strtolower($type);
|
$type = strtolower($type);
|
||||||
if (!isset($this->downloaders[$type])) {
|
if (!isset($this->downloaders[$type])) {
|
||||||
throw new \InvalidArgumentException('Unknown downloader type: '.$type);
|
throw new \InvalidArgumentException(sprintf('Unknown downloader type: %s. Available types: %s.', $type, implode(', ', array_keys($this->downloaders))));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->downloaders[$type];
|
return $this->downloaders[$type];
|
||||||
|
|
Loading…
Reference in New Issue