Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-07-24 19:18:10 +0400
committerRobin Appelman <icewind@owncloud.com>2014-08-04 15:41:04 +0400
commita05147e25c87e320b9dd3d95d244109d88057e62 (patch)
tree7ea4c45e39312e4e565c0c6d454720fea30de57a /public.php
parent4608f8a3b5f3f88ce033817f682103c31f8a934f (diff)
handle service not available exceptions in index, remote and public.php
Diffstat (limited to 'public.php')
-rw-r--r--public.php5
1 files changed, 5 insertions, 0 deletions
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);