Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better error reporting of invalid package.json files.

  • Loading branch information...
commit 5078bafb5a19cb704ff1a03eda557a14973b2bab 1 parent 2b4561a
@tobie authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  main.js
View
3  main.js
@@ -40,6 +40,9 @@ exports.buildFromPackage = function(p, configCallback, callback) {
}
jsonFs.readFile(packageFile, function(err, json) {
if (err) {
+ err.file = packageFile;
+ err.longDesc = err.toString() + '. Malformed JSON in descriptor file:\n ' + packageFile;
+ err.toString = function() { return err.longDesc; };
callback(err);
} else {
var config = json.modulr || {};
Please sign in to comment.
Something went wrong with that request. Please try again.