Skip to content

Commit

Permalink
Raise correct error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbeau committed Jan 27, 2020
1 parent c79a0b4 commit a3ad5f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/locomotive/steam/liquid/tags/concerns/attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ def parse(markup)

def handle(node)
handler = "handle_#{node.type}"
# TODO create specific error
# raise Errno, "unknown expression type: #{node.type.inspect}" unless respond_to?(handler)
unless respond_to?(handler)
raise ::Liquid::SyntaxError.new(
"Fail to parse attributes. Unknown expression type: #{node.type.inspect}")
end
public_send handler, node
end

Expand Down

0 comments on commit a3ad5f4

Please sign in to comment.