Permalink
Browse files

handling filename and linenumbers of exceptions for ff and safari

  • Loading branch information...
1 parent f18d6d9 commit e43110cff3e6b63fa04fc28e79ea56d12550df35 Nick Kallen committed Jul 6, 2008
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/screw.events.js
View
@@ -26,10 +26,12 @@
.bind('failed', function(e, reason) {
$(this)
.addClass('failed')
- .append($('<p class="error">').text(reason.toString()));
- if (reason.fileName || reason.lineNumber) {
- $(this)
- .append($('<p class="error">').text(reason.fileName + " : " + reason.lineNumber));
+ .append($('<p class="error">').text(reason.toString()))
+
+ var file = reason.fileName || reason.sourceURL;
+ var line = reason.lineNumber || reason.line;
+ if (file || line) {
+ $(this).append($('<p class="error">').text('line ' + line + ', ' + file));
}
})
})

0 comments on commit e43110c

Please sign in to comment.