diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-07-21 22:40:35 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-07-21 22:40:35 +0200 |
commit | aa22194a09538572e55b36f76f846c33b0016813 (patch) | |
tree | baea7a97ee5758f3836bf9ef940f4321ecc858f4 /lib/base.php | |
parent | 8c5df31c4951423857e394de02ae25ea5cb53698 (diff) | |
download | nextcloud-server-aa22194a09538572e55b36f76f846c33b0016813.tar.gz nextcloud-server-aa22194a09538572e55b36f76f846c33b0016813.zip |
In debug mode uncaught exceptions should display a nice page
Diffstat (limited to 'lib/base.php')
-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 |