不要怂,就是干,撸起袖子干!

Commit 043502b9 by David Pate

Wrapped the errors for Maria DB in the new `ConnectionError` object.

1 parent 6e0cf9d6
Showing with 3 additions and 2 deletions
......@@ -2,7 +2,8 @@
var AbstractConnectionManager = require('../abstract/connection-manager')
, ConnectionManager
, Utils = require('../../utils')
, Promise = require('../../promise');
, Promise = require('../../promise')
, sequelizeErrors = require('../../errors');
ConnectionManager = function(dialect, sequelize) {
AbstractConnectionManager.call(this, dialect, sequelize);
......@@ -44,7 +45,7 @@ ConnectionManager.prototype.connect = function(config) {
var connection = new self.lib();
connection.connect(connectionConfig);
connection.on('error', function(err) {
return reject(err);
return reject(new sequelizeErrors.ConnectionError(err));
});
connection.on('connect', function() {
return resolve(connection);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!