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>
This commit is contained in:
Morris Jobke
2018-06-29 11:22:05 +02:00
parent eded07f28f
commit 478b95cc20
2 changed files with 21 additions and 5 deletions
+6 -2
View File
@@ -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);