Skip to content

Commit

Permalink
call handleDatabaseError instead of writing custom message
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed May 8, 2024
1 parent b3341ff commit a313b70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a313b70

Please sign in to comment.