2012-01-30 19:37:14 +00:00
|
|
|
exports.safeRequire = safeRequire;
|
|
|
|
|
|
|
|
function safeRequire(module) {
|
|
|
|
try {
|
|
|
|
return require(module);
|
|
|
|
} catch (e) {
|
2012-10-07 10:54:20 +00:00
|
|
|
console.log('Run "npm install jugglingdb ' + module + '" command to use jugglingdb using ' + module + ' database engine');
|
2012-02-20 18:33:11 +00:00
|
|
|
process.exit(1);
|
2012-01-30 19:37:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|