}
}
- 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