浏览代码

List all available downloader types in exception message.

Andrej Hudec 11 年之前
父节点
当前提交
5b4a3f9e9f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Downloader/DownloadManager.php

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

@@ -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];