diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-07-09 10:23:09 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-07-09 10:23:09 +0200 |
commit | 3561a1572b02a54558158d6e06f220764af433d3 (patch) | |
tree | d09b17877788bb091889d6620c02f075988f7cd9 /lib | |
parent | f97b21da11e59c00af395f6e2d5011f1f2e8963a (diff) | |
parent | ecaad05c63b78297b7b27e6d33063551d2c0e07f (diff) | |
download | nextcloud-server-3561a1572b02a54558158d6e06f220764af433d3.tar.gz nextcloud-server-3561a1572b02a54558158d6e06f220764af433d3.zip |
Merge pull request #17405 from owncloud/stable8-backport-17095
[stable8] Proper error handling
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/filesystem.php | 2 | ||||
-rw-r--r-- | lib/private/updater.php | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index 9c125f56c62..7d45d949b47 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -344,7 +344,7 @@ class Filesystem { if (is_null($userObject)) { \OCP\Util::writeLog('files', ' Backends provided no user object for '.$user, \OCP\Util::ERROR); - throw new \OC\User\NoUserException(); + throw new \OC\User\NoUserException('Backends provided no user object for ' . $user); } $homeStorage = \OC_Config::getValue( 'objectstore' ); diff --git a/lib/private/updater.php b/lib/private/updater.php index d28060c100a..4d2f3ab7d75 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -159,14 +159,20 @@ class Updater extends BasicEmitter { } $this->emit('\OC\Updater', 'maintenanceStart'); + $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->config->setSystemValue('maintenance', false); $this->emit('\OC\Updater', 'maintenanceEnd'); + $this->emit('\OC\Updater', 'updateEnd', array($success)); + + return $success; } /** |