1
0
Fork 0

Tweak error message and make TransportException extend from RuntimeException, refs #2753

pull/2773/head
Jordi Boggiano 2014-02-25 13:34:39 +01:00
parent a612b2affe
commit 665a2bd0c0
2 changed files with 7 additions and 4 deletions

View File

@ -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>'
);
}

View File

@ -15,7 +15,7 @@ namespace Composer\Downloader;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class TransportException extends \Exception
class TransportException extends \RuntimeException
{
protected $headers;