diff options
-rw-r--r-- | lib/base.php | 10 |
1 files 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 |