Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-06-09 04:58:47 +0400
committerisaacs <i@izs.me>2012-06-09 05:04:46 +0400
commit3b1a4f0a498b9355bfdef4c7dcdc41e916d9dd3b (patch)
tree6476131d4fc3a733210bc8427e4541623787983c /lib/utils/read-json.js
parent3d153d5586959f9e87063fe2698af1a490d1b5a6 (diff)
Handle errors in the more modern fashion
Diffstat (limited to 'lib/utils/read-json.js')
-rw-r--r--lib/utils/read-json.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/read-json.js b/lib/utils/read-json.js
index 312e670f6..78c0af718 100644
--- a/lib/utils/read-json.js
+++ b/lib/utils/read-json.js
@@ -197,7 +197,7 @@ function processJsonString (opts, cb) { return function (er, jsonString) {
function jsonParseFail (ex, file, cb) {
var e = new Error(
"Failed to parse json\n"+ex.message)
- e.errno = npm.EJSONPARSE
+ e.code = "EJSONPARSE"
e.file = file
if (cb) return cb(e)
throw e