RuntimeException instead of die()

This commit is contained in:
slawkens
2020-02-12 23:20:16 +01:00
parent 38693521b3
commit 13d0718780
9 changed files with 12 additions and 14 deletions

View File

@@ -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) {