diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-09-21 23:32:52 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-09-21 23:32:52 +0200 |
commit | 40a1899bd98ac418994321831f0b2e8bad5f1c94 (patch) | |
tree | 61ed0933474145dec44b27f3e1d96891e0059407 | |
parent | 8cfa618df51801359736e43b4aa4044aadb0ed23 (diff) | |
download | nextcloud-server-40a1899bd98ac418994321831f0b2e8bad5f1c94.tar.gz nextcloud-server-40a1899bd98ac418994321831f0b2e8bad5f1c94.zip |
Catch exceptions when updating an app
-rwxr-xr-x | lib/app.php | 8 |
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)); } } |