Explorar o código

List all available downloader types in exception message.

Andrej Hudec %!s(int64=11) %!d(string=hai) anos
pai
achega
5b4a3f9e9f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Downloader/DownloadManager.php

+ 1 - 1
src/Composer/Downloader/DownloadManager.php

@@ -109,7 +109,7 @@ class DownloadManager
     {
         $type = strtolower($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];