From 87b5375079c758bd81276bc1dd90971a5486ac4f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 12 May 2017 11:57:44 -0700 Subject: [PATCH] db: fix error message. fixes #168. --- lib/db/backends.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/db/backends.js b/lib/db/backends.js index a96976c7..073a4cb1 100644 --- a/lib/db/backends.js +++ b/lib/db/backends.js @@ -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; } };