Merge pull request #113 from SimonHeimberg/plugin_exceptions

Plugin exceptions
This commit is contained in:
Dmitry Khomutov 2017-08-22 21:41:55 +07:00 committed by GitHub
commit eaec65509b

View file

@ -52,7 +52,7 @@ class Builder implements LoggerAwareInterface
/**
* @var array
*/
protected $config;
protected $config = [];
/**
* @var string
@ -217,7 +217,13 @@ class Builder implements LoggerAwareInterface
} else {
$this->build->setStatus(Build::STATUS_FAILED);
}
} catch (\Exception $ex) {
$success = false;
$this->build->setStatus(Build::STATUS_FAILED);
$this->buildLogger->logFailure('Exception: ' . $ex->getMessage(), $ex);
}
try {
if ($success) {
$this->pluginExecutor->executePlugins($this->config, Build::STAGE_SUCCESS);
@ -232,7 +238,6 @@ class Builder implements LoggerAwareInterface
}
}
} catch (\Exception $ex) {
$this->build->setStatus(Build::STATUS_FAILED);
$this->buildLogger->logFailure('Exception: ' . $ex->getMessage(), $ex);
}