Exit on connection failure

This commit is contained in:
Ruan 2015-08-23 07:36:39 +02:00
parent edea8056fa
commit 6ab6d09db9

View File

@ -55,7 +55,7 @@ final class Settings {
try {
$this->conn = new PDO($dsn, $username, $password);
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
die('Connection failed: ' . $e->getMessage());
}
if ($driver === 'pgsql') {
$this->conn->query("SET NAMES 'UTF8';");