Better safeRequire
This commit is contained in:
parent
bf20e000dd
commit
01b9307e1c
|
@ -1,3 +1,4 @@
|
||||||
node_modules
|
node_modules
|
||||||
doc
|
doc
|
||||||
coverage.html
|
coverage.html
|
||||||
|
coverage
|
||||||
|
|
|
@ -4,7 +4,7 @@ function safeRequire(module) {
|
||||||
try {
|
try {
|
||||||
return require(module);
|
return require(module);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Run "npm install ' + module + '" command to use jugglingdb using this database engine');
|
console.log('Run "npm install jugglingdb ' + module + '" command to use jugglingdb using ' + module + ' database engine');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue