Skip to content

Commit

Permalink
Showing line numbers on JS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nathansobo committed Jun 14, 2008
1 parent de2b3ea commit dc60a3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/screw.events.js
Expand Up @@ -27,6 +27,10 @@
$(this) $(this)
.addClass('failed') .addClass('failed')
.append($('<p class="error">').text(reason.toString())); .append($('<p class="error">').text(reason.toString()));
if (reason.fileName || reason.lineNumber) {
$(this)
.append($('<p class="error">').text(reason.fileName + " : " + reason.lineNumber));
}
}) })
}) })
.bind('before', function() { .bind('before', function() {
Expand Down

0 comments on commit dc60a3e

Please sign in to comment.