Explorar el Código

Show more info when a download fails

Jordi Boggiano hace 10 años
padre
commit
777f2e81a3
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/Composer/Downloader/FileDownloader.php

+ 2 - 2
src/Composer/Downloader/FileDownloader.php

@@ -90,10 +90,10 @@ class FileDownloader implements DownloaderInterface
             } catch (\Exception $e) {
                 if ($this->io->isDebug()) {
                     $this->io->write('');
-                    $this->io->write('Failed: ['.get_class($e).'] '.$e->getMessage());
+                    $this->io->write('Failed: ['.get_class($e).'] '.$e->getCode().': '.$e->getMessage());
                 } elseif (count($urls)) {
                     $this->io->write('');
-                    $this->io->write('    Failed, trying the next URL');
+                    $this->io->write('    Failed, trying the next URL ('.$e->getCode().': '.$e->getMessage().')');
                 }
 
                 if (!count($urls)) {