db: fix error message. fixes #168.

This commit is contained in:
Christopher Jeffrey 2017-05-12 11:57:44 -07:00
parent 3ca70a152a
commit 87b5375079
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -13,6 +13,8 @@ exports.get = function get(name) {
try {
return require(name);
} catch (e) {
throw new Error('Database backend "' + name + '" not found.');
if (e.code === 'MODULE_NOT_FOUND')
throw new Error('Database backend "' + name + '" not found.');
throw e;
}
};