diff options
author | Andrew Dolgov <[email protected]> | 2021-01-19 16:54:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-01-19 16:54:35 +0300 |
commit | d8cf8e1bd42338bff1f3d5a75cab6c715128e260 (patch) | |
tree | c19079f66c422fe5bb3bdbd0a0f8b6a3a1a4d203 /db.php | |
parent | 31d1e8fefd86f8f9e1b91032726ea169950ff1c7 (diff) |
pdo: report errors via exceptions
Diffstat (limited to 'db.php')
-rw-r--r-- | db.php | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -10,6 +10,7 @@ class Db { die("Unable to initialize database driver (SQLite): $e"); } //$this->dbh->busyTimeout(30*1000); + $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->dbh->query('PRAGMA journal_mode = wal;'); } |