diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/update.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php index 1c77a4ab67e..20ab045c892 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -10,11 +10,12 @@ if (OC::checkUpgrade(false)) { OC_Hook::connect('update', 'error', $watcher, 'error'); OC_Hook::connect('update', 'error', $watcher, 'failure'); $watcher->success('Turned on maintenance mode'); - $result = OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/db_structure.xml'); - if (!$result) { - $watcher->failure('Error updating database'); + try { + $result = OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/db_structure.xml'); + $watcher->success('Updated database'); + } catch (Exception $exception) { + $watcher->failure($exception->getMessage()); } - $watcher->success('Updated database'); $minimizerCSS = new OC_Minimizer_CSS(); $minimizerCSS->clearCache(); $minimizerJS = new OC_Minimizer_JS(); |