Skip to content

Commit

Permalink
take out of try/catch for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Mar 8, 2023
1 parent b5220ce commit d9270d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions php/libraries/Database.class.inc
Expand Up @@ -108,6 +108,11 @@ class Database implements LoggerAwareInterface

}

$this->_PDO = new PDO(
"mysql:host=$host;dbname=$database;charset=UTF8",
$username,
$password
);
try {
$this->_PDO = new PDO(
"mysql:host=$host;dbname=$database;charset=UTF8",
Expand All @@ -117,6 +122,7 @@ class Database implements LoggerAwareInterface
} catch (PDOException $e) {
// This exception will not be included in the error log as it will
// likely include credentials.
throw $e;
throw new DatabaseException(
"Could not establish a PDO object using the following values: "
. "username: `$username`, dbname: `$database`, host: `$host` "
Expand Down

0 comments on commit d9270d8

Please sign in to comment.