diff options
author | isaacs <i@izs.me> | 2011-02-22 09:02:21 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-02-22 09:04:35 +0300 |
commit | f2d59032ac8dd21d8817272cc2647377dfe42c1e (patch) | |
tree | 34c5de03cb36ac7791f6973aac9ace32f7d7f876 | |
parent | 80cd4bdd070bd4d61d259db8b89f84b796234887 (diff) |
Log the error nicer
-rw-r--r-- | lib/utils/read-json.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/utils/read-json.js b/lib/utils/read-json.js index 7800d2035..d502c0e29 100644 --- a/lib/utils/read-json.js +++ b/lib/utils/read-json.js @@ -73,7 +73,8 @@ function processJsonString (opts, cb) { return function (er, jsonString) { if (opts.file && opts.file.indexOf(npm.dir) === 0) { try { json = require("vm").runInNewContext("(\n"+jsonString+"\n)") - log.error(ex, "parse error "+opts.file) + log.error(opts.file, "Error parsing json") + log.error(ex, "parse error ") } catch (ex2) { return jsonParseFail(ex, cb) } |