Skip to content

Commit 6f23819

Browse files
committed
Merge pull request #27 from LExpress/project-optimize
project:optimize Continue in case of exception when loading a module config
2 parents f3e9028 + a78736e commit 6f23819

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/task/project/sfProjectOptimizeTask.class.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,17 @@ protected function execute($arguments = array(), $options = array())
7070
foreach ($modules as $module)
7171
{
7272
$this->logSection('module', $module);
73-
$this->configuration->getConfigCache()->checkConfig('modules/'.$module.'/config/generator.yml', true);
73+
74+
try
75+
{
76+
$this->configuration->getConfigCache()->checkConfig('modules/'.$module.'/config/generator.yml', true);
77+
}
78+
catch (Exception $e)
79+
{
80+
$this->dispatcher->notifyUntil(new sfEvent($e, 'application.throw_exception'));
81+
82+
$this->logSection($module, $e->getMessage(), null, 'ERROR');
83+
}
7484
}
7585

7686
$templates = $this->findTemplates($modules);

0 commit comments

Comments
 (0)