From 3bf0c2b44fcedbc114f9bf4234d01503ad97a444 Mon Sep 17 00:00:00 2001 From: tracer Date: Tue, 25 Oct 2022 15:50:57 +0200 Subject: [PATCH] added error handling --- src/Service/DatabaseConnection.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Service/DatabaseConnection.php b/src/Service/DatabaseConnection.php index 7077b4b..6d1a286 100644 --- a/src/Service/DatabaseConnection.php +++ b/src/Service/DatabaseConnection.php @@ -36,6 +36,7 @@ class DatabaseConnection username: $dbUser, password: $dbPassword ); + $this->dbConnection->setAttribute(attribute: PDO::ATTR_ERRMODE, value: PDO::ERRMODE_EXCEPTION); } public function getConnection(): PDO