Commit a833cd6b authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Throw a proper exception when a database connection cannot be made,

and add some description for it as well
parent 5b0d126e
......@@ -103,7 +103,8 @@ catch (Exception $e) {
$errormessage = $e->getMessage();
}
ob_end_clean();
throw new Exception($errormessage);
$errormessage = get_string('dbconnfailed', 'error') . $errormessage;
throw new ConfigSanityException($errormessage);
}
try {
load_config();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment