1
0
Fork 0

Fix exception handling when loading repos

pull/1040/merge
Jordi Boggiano 2012-09-08 13:49:37 +02:00
parent 5b9f190bcd
commit c14826dd1e
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
try {
return $this->loader->load($data, 'Composer\Package\CompletePackage');
} catch (\Exception $e) {
throw new \RuntimeException('Could not load package '.$data['name'].' in '.$this->url.': ['.get_class($e).'] '.$e->getMessage());
throw new \RuntimeException('Could not load package '.(isset($data['name']) ? $data['name'] : json_encode($data)).' in '.$this->url.': ['.get_class($e).'] '.$e->getMessage(), 0, $e);
}
}
}