omsmith / browserify-ngannotate

57 stars 7 forks source link

Add file path to error messages #3

Closed jRiest closed 10 years ago

jRiest commented 10 years ago

Add the path to the file which caused the error, which is very helpful for tracking down bugs in a bigger project.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 7a2826dc9408b3fe78c325cfd79b3629914bd9bc on jRiest:add_file_path into e685c188b0f709ed4bd3eb0d1501fdc07347f084 on omsmith:master.

omsmith commented 10 years ago

Thanks for the contribution.

I'm pondering whether browserify may want this behaviour as a whole - I suspect there are already transforms which output file information (such as coffeeify, which also outputs line number information), but I would rarely see an instance where you wouldn't want to know the file the error occured in.

I'll open an issue with @substack and see what he thinks before I merge this.

omsmith commented 10 years ago

I'll go ahead and merge this for now. Will add some tests and publish shortly.

omsmith commented 10 years ago

Published as 0.0.8