Exception если не загрузился config
This commit is contained in:
parent
233e90ce72
commit
b84e13f769
1 changed files with 5 additions and 1 deletions
|
|
@ -54,7 +54,11 @@ class Controller
|
|||
|
||||
public function loadConfig($name) {
|
||||
$filename = Shortcut::getUrl('config', $name);
|
||||
include($filename);
|
||||
if (file_exists($filename)) {
|
||||
include($filename);
|
||||
} else {
|
||||
throw new Exception('Невозможно загрузить файл настроек ' . $name);
|
||||
}
|
||||
return $settings;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue