Use a better error message and point the users to the support channels
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
3773af9af5
commit
37b02fdcae
|
@ -586,6 +586,14 @@ class OC_Installer{
|
|||
$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>.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//run appinfo/install.php
|
||||
|
|
|
@ -212,6 +212,10 @@ class Updater extends BasicEmitter {
|
|||
$success = true;
|
||||
try {
|
||||
$this->doUpgrade($currentVersion, $installedVersion);
|
||||
} catch (HintException $exception) {
|
||||
$this->log->logException($exception, ['app' => 'core']);
|
||||
$this->emit('\OC\Updater', 'failure', array($exception->getMessage() . ': ' .$exception->getHint()));
|
||||
$success = false;
|
||||
} catch (\Exception $exception) {
|
||||
$this->log->logException($exception, ['app' => 'core']);
|
||||
$this->emit('\OC\Updater', 'failure', array(get_class($exception) . ': ' .$exception->getMessage()));
|
||||
|
|
Loading…
Reference in New Issue