]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correctly catch the "soft errors" now 2058/head
authorJoas Schilling <coding@schilljs.com>
Wed, 9 Nov 2016 09:29:25 +0000 (10:29 +0100)
committerJoas Schilling <coding@schilljs.com>
Wed, 9 Nov 2016 09:30:19 +0000 (10:30 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Installer.php

index fdfa44c143f29208b0bbf11ea1b71e6b58937e39..aff2d2194aa2c1c12af788d6debbc5f32c97d3d4 100644 (file)
@@ -429,9 +429,12 @@ class Installer {
                                                                        if ($softErrors) {
                                                                                try {
                                                                                        Installer::installShippedApp($filename);
-                                                                               } catch (\Doctrine\DBAL\Exception\TableExistsException $e) {
-                                                                                       $errors[$filename] = $e;
-                                                                                       continue;
+                                                                               } catch (HintException $e) {
+                                                                                       if ($e->getPrevious() instanceof TableExistsException) {
+                                                                                               $errors[$filename] = $e;
+                                                                                               continue;
+                                                                                       }
+                                                                                       throw $e;
                                                                                }
                                                                        } else {
                                                                                Installer::installShippedApp($filename);
@@ -463,7 +466,8 @@ class Installer {
                        } catch (TableExistsException $e) {
                                throw new 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
                                );
                        }
                }