summaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-07-21 22:29:50 +0200
committerBart Visscher <bartv@thisnet.nl>2013-07-21 22:29:50 +0200
commitdf8ad46daef960accd1e307f74e7bcb705e9fc7b (patch)
tree7848816e8d4aa6074c4d78bdf45cd5f5074e798b /lib/app.php
parent37a731bcad4636f682a2cbcc59dabc9e60494b01 (diff)
downloadnextcloud-server-df8ad46daef960accd1e307f74e7bcb705e9fc7b.tar.gz
nextcloud-server-df8ad46daef960accd1e307f74e7bcb705e9fc7b.zip
Change exit calls to throwing an exception
This way the error won't be fatal in a unit test
Diffstat (limited to 'lib/app.php')
-rw-r--r--lib/app.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/app.php b/lib/app.php
index baacf508d8e..115b7d60f5e 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -839,9 +839,8 @@ class OC_App{
OC_Hook::emit('update', 'success', 'Updated '.$info['name'].' app');
}
catch (Exception $e) {
- echo 'Failed to upgrade "'.$app.'". Exception="'.$e->getMessage().'"';
OC_Hook::emit('update', 'failure', 'Failed to update '.$info['name'].' app: '.$e->getMessage());
- die;
+ throw new RuntimeException('Failed to upgrade "'.$app.'". Exception="'.$e->getMessage().'"');
}
OC_Appconfig::setValue($app, 'installed_version', OC_App::getAppVersion($app));
}