Skip to content

Commit

Permalink
handling filename and linenumbers of exceptions for ff and safari
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Kallen committed Jul 6, 2008
1 parent f18d6d9 commit e43110c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/screw.events.js
Expand Up @@ -26,10 +26,12 @@
.bind('failed', function(e, reason) { .bind('failed', function(e, reason) {
$(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) var file = reason.fileName || reason.sourceURL;
.append($('<p class="error">').text(reason.fileName + " : " + reason.lineNumber)); var line = reason.lineNumber || reason.line;
if (file || line) {
$(this).append($('<p class="error">').text('line ' + line + ', ' + file));
} }
}) })
}) })
Expand Down

0 comments on commit e43110c

Please sign in to comment.