From: Bart Visscher Date: Sun, 21 Jul 2013 20:40:35 +0000 (+0200) Subject: In debug mode uncaught exceptions should display a nice page X-Git-Tag: v6.0.0alpha2~416^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aa22194a09538572e55b36f76f846c33b0016813;p=nextcloud-server.git In debug mode uncaught exceptions should display a nice page --- 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