From ac0ee6441d28274695c0b5eeaa8e7ffacb233035 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:07:06 +0100 Subject: [PATCH] add HTTPSpecialCaseException for database connection --- Kernel/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Model.php b/Kernel/Model.php index 4ce8fb8..462d252 100644 --- a/Kernel/Model.php +++ b/Kernel/Model.php @@ -17,7 +17,7 @@ final class Model try{ self::$conn = new PDO($PDO_URI, $_ENV["DB_USERNAME"], $_ENV["DB_PASSWORD"]); }catch(PDOException $e){ - die("Connection to the database failed"); + throw new HTTPSpecialCaseException(500, "Connection to the database failed"); } } }