From aa22194a09538572e55b36f76f846c33b0016813 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 21 Jul 2013 22:40:35 +0200 Subject: [PATCH] In debug mode uncaught exceptions should display a nice page --- lib/base.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/base.php b/lib/base.php index 1ff462819db..df57fe979f3 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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 -- 2.39.5