Skip to content

Commit a78736e

Browse files
committed
project:optimize Continue in case of execption when loading a module config
1 parent f3e9028 commit a78736e

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)