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:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-20 19:01:47 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-20 19:01:47 +0300
commit6a6fc742dc736875a9d0a2be6891ba0fc635f1dc (patch)
tree2f559b670be9f312e14e58de8879189ecccef01f /index.php
parent069af51dd039fe9790b420b0e74289309a4952c4 (diff)
Catch class Error on all root entrypoints
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);
}