Tweak error message and make TransportException extend from RuntimeException, refs #2753
parent
a612b2affe
commit
665a2bd0c0
|
@ -191,6 +191,9 @@ class DownloadManager
|
|||
$this->filesystem->ensureDirectoryExists($targetDir);
|
||||
|
||||
foreach ($sources as $i => $source) {
|
||||
if (isset($e)) {
|
||||
$this->io->write('<warning>Now trying to download from ' . $source . '</warning>');
|
||||
}
|
||||
$package->setInstallationSource($source);
|
||||
try {
|
||||
$downloader = $this->getDownloaderForInstalledPackage($package);
|
||||
|
@ -204,9 +207,9 @@ class DownloadManager
|
|||
}
|
||||
|
||||
$this->io->write(
|
||||
'<warning>Caught an exception while trying to download '.
|
||||
$package->getPrettyString().
|
||||
': '.
|
||||
'<warning>Failed to download '.
|
||||
$package->getPrettyName().
|
||||
' from ' . $source . ': '.
|
||||
$e->getMessage().'</warning>'
|
||||
);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Composer\Downloader;
|
|||
/**
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
*/
|
||||
class TransportException extends \Exception
|
||||
class TransportException extends \RuntimeException
|
||||
{
|
||||
protected $headers;
|
||||
|
||||
|
|
Loading…
Reference in New Issue