1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 08:44:54 +00:00

Fix PostgreSQL connection error message

This commit is contained in:
J. King 2019-12-02 17:14:03 -05:00
parent f4b08170bf
commit 15de8c2320

View file

@ -185,7 +185,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
$dsn = $this->makeconnectionString(false, $user, $pass, $db, $host, $port, $service); $dsn = $this->makeconnectionString(false, $user, $pass, $db, $host, $port, $service);
set_error_handler(function(int $code, string $msg) { set_error_handler(function(int $code, string $msg) {
$msg = substr($msg, 62); $msg = substr($msg, 62);
throw new Exception("connectionFailure", ["PostgreSQL", $msg]); throw new Exception("connectionFailure", ['engine' => "PostgreSQL", 'message' => $msg]);
}); });
try { try {
$this->db = pg_connect($dsn, \PGSQL_CONNECT_FORCE_NEW); $this->db = pg_connect($dsn, \PGSQL_CONNECT_FORCE_NEW);