Make DB error messages more clear

This commit is contained in:
Jill Stingray 2020-06-30 07:29:49 +00:00
parent f58407575d
commit be4e0b9e71

View file

@ -19,7 +19,7 @@ class DatabaseConnection
if($ex->getCode() === "42000") if($ex->getCode() === "42000")
chandler_db_busy(); chandler_db_busy();
else else
chandler_http_panic(503, "Service Temporarily Unavailable", "Error estabilishing database connection."); chandler_http_panic(503, "Service Temporarily Unavailable", "Error estabilishing database connection: " . $ex->getMessage());
} }
$storage = new FileStorage($tmpFolder ?? (CHANDLER_ROOT . "/tmp/cache/database")); $storage = new FileStorage($tmpFolder ?? (CHANDLER_ROOT . "/tmp/cache/database"));