It seems that RedBean_Driver_PDO has been changed in a way that the connect() method throws a PDOException with the message "Could not connect to database." and error code 0.
I had a function that relied on the resulting PDOException's code to handle the error appropriately: 1044 for access denied, 1049 for unknown database, etc.
So, could you please change the method so that on error the connect() method would throw a PDOException with the original code?
Ah, this has been done because some users forgot to turn off error reporting on production servers thus revealing sensitive security details. I now catch the original exception and re-throw a very neutral one. I will change the code to send the original error code along.
Send original error code along with PDO Exception in connect(), closes …
Has been released on website: version 3.4.4