Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-09 12:30:52 +0300
committerJoas Schilling <coding@schilljs.com>2016-11-09 12:30:52 +0300
commitef53c5f75c48e5b280c7a079b505767f91c2acf3 (patch)
tree13b649d36b9d0946c630aa2c913f709884668064 /lib
parent37b02fdcaefcd98f4a468e22b003e82f17f1b8b8 (diff)
Correctly catch the "soft errors" now
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/installer.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 3b39357b4b6..a3b714d7b3e 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -556,9 +556,12 @@ class OC_Installer{
if ($softErrors) {
try {
OC_Installer::installShippedApp($filename);
- } catch (\Doctrine\DBAL\Exception\TableExistsException $e) {
- $errors[$filename] = $e;
- continue;
+ } catch (\OC\HintException $e) {
+ if ($e->getPrevious() instanceof \Doctrine\DBAL\Exception\TableExistsException) {
+ $errors[$filename] = $e;
+ continue;
+ }
+ throw $e;
}
} else {
OC_Installer::installShippedApp($filename);
@@ -585,13 +588,13 @@ class OC_Installer{
//install the database
$appPath = OC_App::getAppPath($app);
if(is_file("$appPath/appinfo/database.xml")) {
- OC_DB::createDbFromStructure("$appPath/appinfo/database.xml");
try {
OC_DB::createDbFromStructure("$appPath/appinfo/database.xml");
} catch (\Doctrine\DBAL\Exception\TableExistsException $e) {
throw new \OC\HintException(
'Failed to enable app ' . $app,
- 'Please ask for help via one of our <a href="https://nextcloud.com/support/" target="_blank" rel="noreferrer">support channels</a>.'
+ 'Please ask for help via one of our <a href="https://nextcloud.com/support/" target="_blank" rel="noreferrer">support channels</a>.',
+ 0, $e
);
}
}