]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correctly catch the "soft errors" now 2059/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:31:43 +0000 (10:31 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Installer.php

index cb2b841dca962cf365122f7630ad140a06f105be..2a0a6ed4edb50ca489ba3e1f013217d44a291a03 100644 (file)
@@ -533,9 +533,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);
@@ -567,7 +570,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
                                );
                        }
                }