summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-09-21 23:32:52 +0200
committerBart Visscher <bartv@thisnet.nl>2012-09-21 23:32:52 +0200
commit40a1899bd98ac418994321831f0b2e8bad5f1c94 (patch)
tree61ed0933474145dec44b27f3e1d96891e0059407
parent8cfa618df51801359736e43b4aa4044aadb0ed23 (diff)
downloadnextcloud-server-40a1899bd98ac418994321831f0b2e8bad5f1c94.tar.gz
nextcloud-server-40a1899bd98ac418994321831f0b2e8bad5f1c94.zip
Catch exceptions when updating an app
-rwxr-xr-xlib/app.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/app.php b/lib/app.php
index 8c3016d7800..288f82d054b 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -622,7 +622,13 @@ class OC_App{
$installedVersion = $versions[$app];
if (version_compare($currentVersion, $installedVersion, '>')) {
OC_Log::write($app, 'starting app upgrade from '.$installedVersion.' to '.$currentVersion, OC_Log::DEBUG);
- OC_App::updateApp($app);
+ try {
+ OC_App::updateApp($app);
+ }
+ catch (Exception $e) {
+ echo 'Failed to upgrade "'.$app.'". Exception="'.$e->getMessage().'"';
+ die;
+ }
OC_Appconfig::setValue($app, 'installed_version', OC_App::getAppVersion($app));
}
}