diff options
| author | 2019-12-25 23:21:12 +0100 | |
|---|---|---|
| committer | 2019-12-25 23:21:12 +0100 | |
| commit | f3d75b3ae5ba6f375a04b46e4f72a210cafe9d54 (patch) | |
| tree | 4d45903a949d9bff89a2720614b5fe7300a7d2bc /lib/Minz/ModelPdo.php | |
| parent | ef062803ee5c0ebd4a5e1d08913f1377d2e7db10 (diff) | |
tec: Improve logs on DB connection failure (#2734)
For a moment, PHP wasn't able to connect to my database. I tried to
understand what happened, unfortunately, the logs were not very helpful
(it basically showed me information that I had in my configuration
file).
I changed the dsn string by the message from the raised exception, I
think it will be more useful.
Other call of Minz_PDOConnectionException are passing error messages
instead of string connection, so I took the opportunity to rename the
constructor argument.
Diffstat (limited to 'lib/Minz/ModelPdo.php')
| -rw-r--r-- | lib/Minz/ModelPdo.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index ed88d58d1..65ac5653b 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -91,7 +91,7 @@ class Minz_ModelPdo { self::$sharedPdo = $this->pdo; } catch (Exception $e) { throw new Minz_PDOConnectionException( - $dsn . $dsnParams, + $e->getMessage(), $db['user'], Minz_Exception::ERROR ); } |
