summaryrefslogtreecommitdiffstats
path: root/status.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-10 13:45:19 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-06-10 13:45:19 +0200
commit8dc6bdd96b9088b87fe8d11346338343135c77e7 (patch)
tree2f969c8b9a0572d7e4648c9ad8ff2524bdaf27af /status.php
parentc0bdbd9d81eb22ded95cd7ea9b26a0c36cfa1be0 (diff)
downloadnextcloud-server-8dc6bdd96b9088b87fe8d11346338343135c77e7.tar.gz
nextcloud-server-8dc6bdd96b9088b87fe8d11346338343135c77e7.zip
clean up usage of DatabaseSetupException and catch Exceptions in entrypoints
Diffstat (limited to 'status.php')
-rw-r--r--status.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/status.php b/status.php
index 9d6ac87c671..bac01c11b28 100644
--- a/status.php
+++ b/status.php
@@ -23,13 +23,20 @@
$RUNTIME_NOAPPS = true; //no apps, yet
-require_once 'lib/base.php';
+try {
-if(OC_Config::getValue('installed')==1) $installed='true'; else $installed='false';
-$values=array(
- 'installed'=>$installed,
- 'version'=>implode('.', OC_Util::getVersion()),
- 'versionstring'=>OC_Util::getVersionString(),
- 'edition'=>OC_Util::getEditionString());
+ require_once 'lib/base.php';
-echo(json_encode($values));
+ if(OC_Config::getValue('installed')==1) $installed='true'; else $installed='false';
+ $values=array(
+ 'installed'=>$installed,
+ 'version'=>implode('.', OC_Util::getVersion()),
+ 'versionstring'=>OC_Util::getVersionString(),
+ 'edition'=>OC_Util::getEditionString());
+
+ echo(json_encode($values));
+
+} catch (Exception $ex) {
+ OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
+ \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
+} \ No newline at end of file