In debug mode uncaught exceptions should display a nice page

This commit is contained in:
Bart Visscher 2013-07-21 22:40:35 +02:00
parent 8c5df31c49
commit aa22194a09
1 changed files with 7 additions and 3 deletions

View File

@ -422,9 +422,13 @@ class OC {
}
}
if (!defined('PHPUNIT_RUN') and !(defined('DEBUG') and DEBUG)) {
OC\Log\ErrorHandler::register();
OC\Log\ErrorHandler::setLogger(OC_Log::$object);
if (!defined('PHPUNIT_RUN')) {
if (defined('DEBUG') and DEBUG) {
set_exception_handler(array('OC_Template', 'printExceptionErrorPage'));
} else {
OC\Log\ErrorHandler::register();
OC\Log\ErrorHandler::setLogger(OC_Log::$object);
}
}
// register the stream wrappers