Permalink
Browse files

add in <path> to getLocalJSON error

  • Loading branch information...
1 parent 27b6912 commit e6552c554c1e9b9be93d912a977b04b16e7927fb @tj tj committed Dec 20, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Package.js
View
@@ -119,11 +119,13 @@ Package.prototype.mkdir = function(dir, fn){
*/
Package.prototype.getLocalJSON = function(fn){
- fs.readFile(this.join('component.json'), 'utf8', function(err, json){
+ var path = this.join('component.json');
+ fs.readFile(path, 'utf8', function(err, json){
if (err) return fn(err);
try {
json = JSON.parse(json);
} catch (err) {
+ err.message += ' in ' + path;
return fn(err);
}
fn(null, json);

0 comments on commit e6552c5

Please sign in to comment.