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