diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-20 18:01:47 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-20 18:01:47 +0200 |
commit | 6a6fc742dc736875a9d0a2be6891ba0fc635f1dc (patch) | |
tree | 2f559b670be9f312e14e58de8879189ecccef01f /index.php | |
parent | 069af51dd039fe9790b420b0e74289309a4952c4 (diff) | |
download | nextcloud-server-6a6fc742dc736875a9d0a2be6891ba0fc635f1dc.tar.gz nextcloud-server-6a6fc742dc736875a9d0a2be6891ba0fc635f1dc.zip |
Catch class Error on all root entrypoints
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); } |