From 3fa264a43a50470f9f0a9795ca914aa8479ee5ef Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Fri, 11 Dec 2015 00:16:09 -0600 Subject: [PATCH] Fixed readFromDB error might cause excpection --- lib/db.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/db.js b/lib/db.js index 4c51c29..1ac6f0e 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");