In debug mode uncaught exceptions should display a nice page
This commit is contained in:
parent
8c5df31c49
commit
aa22194a09
10
lib/base.php
10
lib/base.php
|
@ -422,9 +422,13 @@ class OC {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('PHPUNIT_RUN') and !(defined('DEBUG') and DEBUG)) {
|
if (!defined('PHPUNIT_RUN')) {
|
||||||
OC\Log\ErrorHandler::register();
|
if (defined('DEBUG') and DEBUG) {
|
||||||
OC\Log\ErrorHandler::setLogger(OC_Log::$object);
|
set_exception_handler(array('OC_Template', 'printExceptionErrorPage'));
|
||||||
|
} else {
|
||||||
|
OC\Log\ErrorHandler::register();
|
||||||
|
OC\Log\ErrorHandler::setLogger(OC_Log::$object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// register the stream wrappers
|
// register the stream wrappers
|
||||||
|
|
Loading…
Reference in New Issue