Split the exception handling so install errors don't log as setup errors
More gebuging Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
ac89b6abe7
commit
fca8f061ab
|
@ -353,11 +353,9 @@ class Setup {
|
||||||
|
|
||||||
$this->config->setValues($newConfigValues);
|
$this->config->setValues($newConfigValues);
|
||||||
|
|
||||||
|
$dbSetup->initialize($options);
|
||||||
try {
|
try {
|
||||||
$dbSetup->initialize($options);
|
|
||||||
$dbSetup->setupDatabase($username);
|
$dbSetup->setupDatabase($username);
|
||||||
// apply necessary migrations
|
|
||||||
$dbSetup->runMigrations();
|
|
||||||
} catch (\OC\DatabaseSetupException $e) {
|
} catch (\OC\DatabaseSetupException $e) {
|
||||||
$error[] = [
|
$error[] = [
|
||||||
'error' => $e->getMessage(),
|
'error' => $e->getMessage(),
|
||||||
|
@ -371,6 +369,16 @@ class Setup {
|
||||||
];
|
];
|
||||||
return $error;
|
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
|
//create the user and group
|
||||||
$user = null;
|
$user = null;
|
||||||
|
|
Loading…
Reference in New Issue