Try to gum up the works on connection errors

This commit is contained in:
Timothy Warren 2016-03-11 13:41:33 -05:00
parent 6dba16ac24
commit 29bc4d4574
3 changed files with 13 additions and 1 deletions

View File

@ -10,6 +10,10 @@ class Firebird extends Adapter {
super({});
fb.attach(config, (err, instance) => {
this.instance = instance;
if (err) {
throw new Error(err);
}
});
}

View File

@ -9,7 +9,11 @@ class Mysql extends Adapter {
constructor(config) {
let instance = mysql2.createConnection(config);
instance.connect();
instance.connect(err => {
if (err) {
throw new Error(err);
}
});
super(instance);
}

View File

@ -36,6 +36,10 @@ class Pg extends Adapter {
instance.connect(err => {
connected = true;
if (err) {
throw new Error(err);
}
});
}