Commit dc9ed98d authored by Volker Krause's avatar Volker Krause
Browse files

Fix error reporting on early database problems

Happens e.g. when having no write access to the sqlite database file
location.
parent a3b21dcf
......@@ -31,7 +31,7 @@ function __construct()
$conf = new Config;
$this->db = new PDO($conf->dsn(), $conf->username(), $conf->password());
} catch (PDOException $e) {
die('Database connection failed: ' . $e->getMessage());
throw new RESTException($e->getMessage(), 500);
}
}
......
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