Enable PDO exception mode

This commit is contained in:
ruan 2015-08-30 08:40:02 +02:00
parent 636f33205a
commit c2a95a955d

View File

@ -67,6 +67,7 @@ final class Settings {
} catch (PDOException $e) {
die('Connection failed: ' . $e->getMessage());
}
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
if ($driver === 'pgsql') {
$this->conn->query("SET NAMES 'UTF8';");
}