From a05147e25c87e320b9dd3d95d244109d88057e62 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 24 Jul 2014 17:18:10 +0200 Subject: handle service not available exceptions in index, remote and public.php --- public.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public.php') diff --git a/public.php b/public.php index 2ac082dba57..0e04db66da7 100644 --- a/public.php +++ b/public.php @@ -45,6 +45,11 @@ try { require_once OC_App::getAppPath($app) . '/' . $parts[1]; +} catch (\OC\ServiceUnavailableException $ex) { + //show the user a detailed error page + OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); + \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL); + OC_Template::printExceptionErrorPage($ex); } catch (Exception $ex) { //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); -- cgit v1.2.3