mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 19:30:47 -07:00
remove unnecessary method
This commit is contained in:
@@ -93,7 +93,10 @@ module Liquid
|
|||||||
|
|
||||||
|
|
||||||
def handle_error(e, token=nil)
|
def handle_error(e, token=nil)
|
||||||
e = Liquid::Error.error_from_token(e, token) if token
|
if e.is_a?(Liquid::Error)
|
||||||
|
e.set_line_number_from_token(token)
|
||||||
|
end
|
||||||
|
|
||||||
errors.push(e)
|
errors.push(e)
|
||||||
raise if exception_handler && exception_handler.call(e)
|
raise if exception_handler && exception_handler.call(e)
|
||||||
Liquid::Error.render(e)
|
Liquid::Error.render(e)
|
||||||
|
|||||||
@@ -20,11 +20,6 @@ module Liquid
|
|||||||
str
|
str
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.error_from_token(e, token)
|
|
||||||
e.set_line_number_from_token(token) if e.is_a?(Liquid::Error)
|
|
||||||
e
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_line_number_from_token(token)
|
def set_line_number_from_token(token)
|
||||||
return unless token.respond_to?(:line_number)
|
return unless token.respond_to?(:line_number)
|
||||||
self.line_number = token.line_number
|
self.line_number = token.line_number
|
||||||
|
|||||||
Reference in New Issue
Block a user