Try to gum up the works on connection errors
This commit is contained in:
parent
6dba16ac24
commit
29bc4d4574
@ -10,6 +10,10 @@ class Firebird extends Adapter {
|
||||
super({});
|
||||
fb.attach(config, (err, instance) => {
|
||||
this.instance = instance;
|
||||
|
||||
if (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,10 @@ class Pg extends Adapter {
|
||||
|
||||
instance.connect(err => {
|
||||
connected = true;
|
||||
|
||||
if (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user