le51, great answer! Havnt notice this so far :)
Thanks to you I've modified my bootstrap file, sharing, in case someone finds it useful:
try {
$root = str_replace('\\', '/', dirname(dirname(__FILE__))) . '/';
require_once $root . 'apps/Bootstrap.php';
$bootstrap = new Bootstrap();
// Listen for all notices, warnings and exceptions in Dev mode
if ($bootstrap->getApp()->config->debug === true) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
$debug = new \Phalcon\Debug();
$debug->listenLowSeverity();
} else {
error_reporting(0);
}
// Run
$bootstrap->run();
} catch (\Exception $e) {
if ($bootstrap->getApp()->config->debug === true) {
$debug = new \Phalcon\Debug();
die($debug->listen()->onUncaughtException($e));
} else {
header('HTTP/1.1 500 Internal Server Error');
// Show error 500 page
}
}
P.S. Michal, you can accept le51's answer :)