Commit c286f623 authored by anarcat's avatar anarcat Committed by anarcat

#654614 - improve database error handling

parent 4e9afd1a
......@@ -21,7 +21,7 @@ function provision_db_connect() {
$connection = @mysql_connect(drush_get_option('master_db_host'), drush_get_option('master_db_user'), drush_get_option('master_db_passwd'));
if (!$connection) {
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not connect to the master database server.'), 'error');
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not connect to the master database server (%err).', array('%err' => mysql_error())), 'error');
}
else {
$success = @mysql_select_db('mysql', $connection);
......@@ -29,7 +29,7 @@ function provision_db_connect() {
_provision_db_connection($connection);
}
else {
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not select the mysql database.'), 'error');
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not select the mysql database (%err).', array('%err' => mysql_error())), 'error');
return FALSE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment