diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
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); } |