Enabling the exception / error handler for console mode only. Also fixing a catchable fatal error in the BuildFactory class.
This commit is contained in:
parent
83a74952ee
commit
f84e31b644
|
@ -21,11 +21,16 @@ class BuildFactory
|
|||
/**
|
||||
* @param $buildId
|
||||
* @return Build
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function getBuildById($buildId)
|
||||
{
|
||||
$build = Factory::getStore('Build')->getById($buildId);
|
||||
|
||||
if (empty($build)) {
|
||||
throw new \Exception('Build ID ' . $buildId . ' does not exist.');
|
||||
}
|
||||
|
||||
return self::getBuild($build);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,8 +59,10 @@ if (!file_exists(dirname(__FILE__) . '/vendor/autoload.php') && defined('PHPCI_I
|
|||
// Load Composer autoloader:
|
||||
require_once(dirname(__FILE__) . '/vendor/autoload.php');
|
||||
|
||||
$loggerConfig = LoggerConfig::newFromFile(__DIR__ . "/loggerconfig.php");
|
||||
Handler::register($loggerConfig->getFor('_'));
|
||||
if (defined('PHPCI_IS_CONSOLE') && PHPCI_IS_CONSOLE) {
|
||||
$loggerConfig = LoggerConfig::newFromFile(__DIR__ . "/loggerconfig.php");
|
||||
Handler::register($loggerConfig->getFor('_'));
|
||||
}
|
||||
|
||||
// Load configuration if present:
|
||||
$conf = array();
|
||||
|
|
Loading…
Reference in a new issue