aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Setup.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-01-07 20:04:04 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-01-07 20:11:25 +0100
commitf1921364d692a521c5bf5860ce453bae3f9facae (patch)
tree7e52141f0a4d909e95468c3a41b16589561912a6 /lib/private/Setup.php
parent5020c73d15cc58cacfe8bebf87dba2652c7ea5c1 (diff)
downloadnextcloud-server-f1921364d692a521c5bf5860ce453bae3f9facae.tar.gz
nextcloud-server-f1921364d692a521c5bf5860ce453bae3f9facae.zip
Print an exception trace for setup exceptions
Right now any setup error will just result in the exception message being printed. In some cases this doesn't give any insights into what went wrong. This adds some dedicated logic to print the exception trace and any previous exceptions to the CLI. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r--lib/private/Setup.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 873e82e55de..98cf11e3a87 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -236,6 +236,7 @@ class Setup {
} catch (\OC\HintException $e) {
$errors[] = [
'error' => $e->getMessage(),
+ 'exception' => $e,
'hint' => $e->getHint(),
];
$htAccessWorking = false;
@@ -360,12 +361,14 @@ class Setup {
} catch (\OC\DatabaseSetupException $e) {
$error[] = [
'error' => $e->getMessage(),
+ 'exception' => $e,
'hint' => $e->getHint(),
];
return $error;
} catch (Exception $e) {
$error[] = [
'error' => 'Error while trying to create admin user: ' . $e->getMessage(),
+ 'exception' => $e,
'hint' => '',
];
return $error;
@@ -376,6 +379,7 @@ class Setup {
} catch (Exception $e) {
$error[] = [
'error' => 'Error while trying to initialise the database: ' . $e->getMessage(),
+ 'exception' => $e,
'hint' => '',
];
return $error;