diff options
author | Joas Schilling <coding@schilljs.com> | 2016-11-09 09:10:32 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-11-09 09:10:32 +0100 |
commit | 224dfaf1e60ce9c6493ffb0449bdfcca5f31ec29 (patch) | |
tree | dd78aa4f5460d10c7ee20faeae4c39386fb20263 /lib/private/Installer.php | |
parent | 05cf1dab4ca7d69a837c2c9e890f078cef76c744 (diff) | |
download | nextcloud-server-224dfaf1e60ce9c6493ffb0449bdfcca5f31ec29.tar.gz nextcloud-server-224dfaf1e60ce9c6493ffb0449bdfcca5f31ec29.zip |
Use a better error message and point the users to the support channels
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Installer.php')
-rw-r--r-- | lib/private/Installer.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php index 2366b762654..fdfa44c143f 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -41,6 +41,7 @@ namespace OC; +use Doctrine\DBAL\Exception\TableExistsException; use OC\App\AppStore\Fetcher\AppFetcher; use OC\App\CodeChecker\CodeChecker; use OC\App\CodeChecker\EmptyCheck; @@ -457,7 +458,14 @@ class 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 (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>.' + ); + } } //run appinfo/install.php |