Catch exceptions when updating an app

This commit is contained in:
Bart Visscher 2012-09-21 23:32:52 +02:00
parent 8cfa618df5
commit 40a1899bd9
1 changed files with 7 additions and 1 deletions

View File

@ -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);
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));
}
}