Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/index.php b/index.php
index f3bf699f3c1..2acf81ab6d7 100644
--- a/index.php
+++ b/index.php
@@ -39,7 +39,7 @@ try {
OC::handleRequest();
} catch(\OC\ServiceUnavailableException $ex) {
- \OCP\Util::logException('index', $ex);
+ \OC::$server->getLogger()->logException($ex, ['app' => 'index']);
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
@@ -48,9 +48,13 @@ try {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint());
} catch (Exception $ex) {
- \OCP\Util::logException('index', $ex);
+ \OC::$server->getLogger()->logException($ex, ['app' => 'index']);
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);
+} catch (Error $ex) {
+ \OC::$server->getLogger()->logException($ex, ['app' => 'index']);
+ OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
+ OC_Template::printExceptionErrorPage($ex);
}