Adding global try/catch in Builder, in hope of fixing forever-hanging. Closes #354, Closes #304

This commit is contained in:
Dan Cryer 2014-04-16 09:05:48 +01:00
parent 6513454265
commit 6917e88f9b

View file

@ -136,16 +136,22 @@ class Builder implements LoggerAwareInterface
/**
* Set the config array, as read from phpci.yml
* @param array
* @param array|null $config
* @throws \Exception
*/
public function setConfigArray(array $config)
public function setConfigArray($config)
{
if (is_null($config) || !is_array($config)) {
throw new \Exception('This project does not contain a phpci.yml file, or it is empty.');
}
$this->config = $config;
}
/**
* Access a variable from the phpci.yml file.
* @param string
* @return mixed
*/
public function getConfig($key)
{