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