]> source.dussan.org Git - nextcloud-server.git/commitdiff
In debug mode uncaught exceptions should display a nice page
authorBart Visscher <bartv@thisnet.nl>
Sun, 21 Jul 2013 20:40:35 +0000 (22:40 +0200)
committerBart Visscher <bartv@thisnet.nl>
Sun, 21 Jul 2013 20:40:35 +0000 (22:40 +0200)
lib/base.php

index 1ff462819db4b5a1901cff0aeb213be6748f8bda..df57fe979f3e9d8b421ae9fa9d89343b41d2dc36 100644 (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