app params try catch

This commit is contained in:
Yuri Kuznetsov
2020-01-27 11:21:58 +02:00
parent 33a19fa6dd
commit 9ec359df3d
+6 -1
View File
@@ -107,7 +107,12 @@ class App extends \Espo\Core\Services\Base
foreach (($this->getMetadata()->get(['app', 'appParams']) ?? []) as $paramKey => $item) {
$className = $item['className'] ?? null;
if (!$className) continue;
$itemParams = $this->getInjection('injectableFactory')->createByClassName($className)->get();
try {
$itemParams = $this->getInjection('injectableFactory')->createByClassName($className)->get();
} catch (\Throwable $e) {
$GLOBALS['log']->error("appParam {$paramKey}: " . $e->getMessage());
continue;
}
$appParams[$paramKey] = $itemParams;
}