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 --- remote.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'remote.php') diff --git a/remote.php b/remote.php index a91742b0475..d854b1d65a6 100644 --- a/remote.php +++ b/remote.php @@ -51,6 +51,10 @@ try { $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; require_once $file; +} catch (\OC\ServiceUnavailableException $ex) { + OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); + \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL); + OC_Template::printExceptionErrorPage($ex); } catch (Exception $ex) { OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL); -- cgit v1.2.3