Skip to content

Commit

Permalink
Add filename to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bfred-it committed Aug 12, 2015
1 parent d49302f commit ca67a9f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion lib/parser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion src/parser.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ class Parser

parser = new JadeParser string, file, @options

while (type = parser.peek().type) isnt 'eos'
while (true)
try {
if((type = parser.peek().type) === 'eos') {
break;
}
} catch (e) {
e.message += file;
throw e;
}
switch type
when 'extends', 'include'
path = parser.expect(type).val.trim()
Expand Down

0 comments on commit ca67a9f

Please sign in to comment.