mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-27 21:56:50 +01:00
RuntimeException instead of die()
This commit is contained in:
@@ -15,7 +15,7 @@ if(file_exists(BASE . 'config.local.php')) // user customizations
|
||||
require BASE . 'config.local.php';
|
||||
|
||||
if(!isset($config['installed']) || !$config['installed']) {
|
||||
die('MyAAC has not been installed yet or there was error during installation. Please install again.');
|
||||
throw new RuntimeException('MyAAC has not been installed yet or there was error during installation. Please install again.');
|
||||
}
|
||||
|
||||
date_default_timezone_set($config['date_timezone']);
|
||||
@@ -139,7 +139,7 @@ else {
|
||||
$vocations->load($file);
|
||||
|
||||
if(!$vocations)
|
||||
die('ERROR: Cannot load <i>vocations.xml</i> file.');
|
||||
throw new RuntimeException('ERROR: Cannot load <i>vocations.xml</i> file.');
|
||||
|
||||
$config['vocations'] = array();
|
||||
foreach($vocations->getElementsByTagName('vocation') as $vocation) {
|
||||
|
||||
Reference in New Issue
Block a user