diff --git a/classes/db.php b/classes/db.php
index 96a8882751078adb63d72e7ac623d9e2a87ea741..e9d9e8417bb7fbf681f2933570f23b3ad245c564 100644
--- a/classes/db.php
+++ b/classes/db.php
@@ -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;
 	}
-}
\ No newline at end of file
+}