Problem/Motivation
If a migration database connection fails you get a very generic error message like
In Connection.php line 197:
SQLSTATE[HY000] [1045] Access denied for user 'USER'@'IPADDRESS' (using password: YES)
If dealing with a situation with multiple databases that can be very unhelpful.
Steps to reproduce
Run migrate task that hits an unavailable database or uses an incorrect password/username
Proposed resolution
Catch the Database/PDO exception and throw a more detailed exception.
Suggesting something like:
Migration MIGRATIONNAME failed to connect to CONNECTIONNAME:default. SQLSTATE[HY000] [1045] Access denied for user 'USER'@'IPADDRESS' (using password: YES)