Skip to content

Commit 989aa53

Browse files
committed
Merge pull request #26 from NodeGuy/anonymous
Show line and column with anonymous files.
2 parents b786c14 + 534093b commit 989aa53

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

dist/longjohn.js

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/longjohn.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ format_location = (frame) ->
1111
return 'eval at ' + frame.getEvalOrigin() if frame.isEval()
1212

1313
file = frame.getFileName()
14+
file = frame.getFileName() || '<anonymous>'
1415
line = frame.getLineNumber()
1516
column = frame.getColumnNumber()
1617

17-
return 'unknown source' unless file?
1818
column = if column? then ':' + column else ''
1919
line = if line? then ':' + line else ''
2020

0 commit comments

Comments
 (0)