summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-29 11:22:05 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-06-29 11:22:05 +0200
commit478b95cc20de9173cbda4c7f69ac3a78ca448250 (patch)
tree6b203c3a7aedc437d132c0a446a69476deff9d5a /index.php
parenteded07f28fade99bdb7d832bf9294cbd609e2802 (diff)
downloadnextcloud-server-478b95cc20de9173cbda4c7f69ac3a78ca448250.tar.gz
nextcloud-server-478b95cc20de9173cbda4c7f69ac3a78ca448250.zip
Try to not run into the white page of death and still log something in the web server error log
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
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 4b5991a3ade..ba83054ccca 100644
--- a/index.php
+++ b/index.php
@@ -50,8 +50,12 @@ try {
try {
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), 503);
} catch (Exception $ex2) {
- \OC::$server->getLogger()->logException($ex, array('app' => 'index'));
- \OC::$server->getLogger()->logException($ex2, array('app' => 'index'));
+ try {
+ \OC::$server->getLogger()->logException($ex, array('app' => 'index'));
+ \OC::$server->getLogger()->logException($ex2, array('app' => 'index'));
+ } catch (Throwable $e) {
+ // no way to log it properly - but to avoid a white page of death we try harder and ignore this one here
+ }
//show the user a detailed error page
OC_Template::printExceptionErrorPage($ex, 500);