diff options
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r-- | lib/private/updater.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php index bd9e8a65363..00c6569a52f 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -189,20 +189,25 @@ class Updater extends BasicEmitter { $this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, array('app' => 'core')); } + $success = true; try { $this->doUpgrade($currentVersion, $installedVersion); } catch (\Exception $exception) { - $this->emit('\OC\Updater', 'failure', array($exception->getMessage())); + \OCP\Util::logException('update', $exception); + $this->emit('\OC\Updater', 'failure', array(get_class($exception) . ': ' .$exception->getMessage())); + $success = false; } - $this->emit('\OC\Updater', 'updateEnd'); + $this->emit('\OC\Updater', 'updateEnd', array($success)); - if(!$wasMaintenanceModeEnabled) { + if(!$wasMaintenanceModeEnabled && $success) { $this->config->setSystemValue('maintenance', false); $this->emit('\OC\Updater', 'maintenanceDisabled'); } else { $this->emit('\OC\Updater', 'maintenanceActive'); } + + return $success; } /** |