Better safeRequire

This commit is contained in:
Anatoliy Chakkaev 2012-10-07 14:54:20 +04:00
parent bf20e000dd
commit 01b9307e1c
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules node_modules
doc doc
coverage.html coverage.html
coverage

View File

@ -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);
} }
} }