From a313b70e12c7c08b1ca95a9a39c86ed820039abc Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Wed, 8 May 2024 12:10:19 +0400 Subject: [PATCH] call handleDatabaseError instead of writing custom message --- src/core/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Database.php b/src/core/Database.php index ce00ba0..0e32b12 100644 --- a/src/core/Database.php +++ b/src/core/Database.php @@ -26,7 +26,7 @@ protected static function connect(): PDO } catch (PDOException $e) { // if PHPUnit is not running, handle the exception if (!defined('PHPUNIT_STEAMY_TESTSUITE')) { - (new Error())->index("Sorry, we're unable to process your request at the moment. Please try again later."); + (new Error())->handleDatabaseError(); die(); } else { // if PHPUnit is running, re-throw the exception to allow it to propagate