Quellcode durchsuchen

Split the exception handling so install errors don't log as setup errors

More gebuging

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v19.0.0beta1
Joas Schilling vor 4 Jahren
Ursprung
Commit
fca8f061ab
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 11 neuen und 3 gelöschten Zeilen
  1. 11
    3
      lib/private/Setup.php

+ 11
- 3
lib/private/Setup.php Datei anzeigen

@@ -353,11 +353,9 @@ class Setup {

$this->config->setValues($newConfigValues);

$dbSetup->initialize($options);
try {
$dbSetup->initialize($options);
$dbSetup->setupDatabase($username);
// apply necessary migrations
$dbSetup->runMigrations();
} catch (\OC\DatabaseSetupException $e) {
$error[] = [
'error' => $e->getMessage(),
@@ -371,6 +369,16 @@ class Setup {
];
return $error;
}
try {
// apply necessary migrations
$dbSetup->runMigrations();
} catch (Exception $e) {
$error[] = [
'error' => 'Error while trying to initialise the database: ' . $e->getMessage(),
'hint' => '',
];
return $error;
}

//create the user and group
$user = null;

Laden…
Abbrechen
Speichern