prefix for Liquid::Error instances

This commit is contained in:
Florian Weingarten
2014-09-05 14:12:30 +00:00
parent aabbd8f1a1
commit c83e1c7b6d
4 changed files with 44 additions and 19 deletions
+2 -2
View File
@@ -20,12 +20,12 @@ module Liquid
def strict_parse_with_error_context(markup)
strict_parse(markup)
rescue SyntaxError => e
e.message << markup_context(markup)
e.markup_context = markup_context(markup)
raise e
end
def markup_context(markup)
" in \"#{markup.strip}\""
"in \"#{markup.strip}\""
end
end
end