Skip to content

Commit

Permalink
Merge branch 'pr-1052' into pull-requests
Browse files Browse the repository at this point in the history
  • Loading branch information
n1mmy committed May 23, 2013
2 parents 3d0a551 + 28ea851 commit 37fecbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
can be used to create repeatable test cases for code that picks random
values. #1033

* Fix CoffeeScript error reporting to include source file and line
number again. #1052

Patches contributed by GitHub users awwx and timhaines.


Expand Down
6 changes: 5 additions & 1 deletion packages/coffeescript/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ var coffeescript_handler = function(bundle, source_path, serve_path, where) {
try {
contents = coffee.compile(contents.toString('utf8'), options);
} catch (e) {
return bundle.error(e.message);
return bundle.error(
source_path + ':' +
(e.location ? (e.location.first_line + ': ') : ' ') +
e.message
);
}

contents = new Buffer(contents);
Expand Down

0 comments on commit 37fecbd

Please sign in to comment.