PDO: switch error reporting to exceptions

master
Andrew Dolgov 6 years ago
parent de1b9acba1
commit 01d22e255f

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

Loading…
Cancel
Save