PDO: switch error reporting to exceptions

This commit is contained in:
Andrew Dolgov 2018-09-03 12:30:26 +03:00
parent de1b9acba1
commit 01d22e255f
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ class Db
exit(101); exit(101);
} }
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
if (DB_TYPE == "pgsql") { if (DB_TYPE == "pgsql") {
@ -102,4 +102,4 @@ class Db
return self::$instance->pdo; return self::$instance->pdo;
} }
} }