# File lib/liquid/errors.rb, line 25 def self.render(e) if e.is_a?(Liquid::Error) e.to_s else "Liquid error: #{e.to_s}" end end
# File lib/liquid/errors.rb, line 19 def set_line_number_from_token(token) return unless token.respond_to?(:line_number) return if self.line_number self.line_number = token.line_number end
# File lib/liquid/errors.rb, line 6 def to_s(with_prefix=true) str = "" str << message_prefix if with_prefix str << super() if markup_context str << " " str << markup_context end str end
# File lib/liquid/errors.rb, line 35 def message_prefix str = "" if is_a?(SyntaxError) str << "Liquid syntax error" else str << "Liquid error" end if line_number str << " (line #{line_number})" end str << ": " str end