summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2015-12-11 00:16:09 -0600
committerWu Cheng-Han2015-12-11 00:16:09 -0600
commit3fa264a43a50470f9f0a9795ca914aa8479ee5ef (patch)
tree9a86b668cd061ae9e47767d94da26ff1a07f8708
parentdebcfdef14346ed4aecc52662031e4e29245fffd (diff)
Fixed readFromDB error might cause excpection
Diffstat (limited to '')
-rw-r--r--lib/db.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/db.js b/lib/db.js
index 4c51c291..1ac6f0e1 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -85,7 +85,8 @@ function readFromDB(id, callback) {
} else {
//logger.info(result.rows);
if (result.rows.length <= 0) {
- callback("not found note in db: " + util.inspect(id), null);
+ callback("not found note in db", null);
+ return logger.error("not found note in db: " + id, err);
} else {
if(config.debug)
logger.info("read from db success");