Add Whoops exception handler (nicer debug info in dev mode)

On production = no errors
This commit is contained in:
slawkens
2023-05-29 08:55:26 +02:00
parent 7690811da3
commit 7c2c88f780
7 changed files with 15 additions and 127 deletions

View File

@@ -18,6 +18,10 @@ if(!isset($config['installed']) || !$config['installed']) {
throw new RuntimeException('MyAAC has not been installed yet or there was error during installation. Please install again.');
}
if(config('env') === 'dev') {
require SYSTEM . 'exception.php';
}
date_default_timezone_set($config['date_timezone']);
// take care of trailing slash at the end
if($config['server_path'][strlen($config['server_path']) - 1] !== '/')