From a3ad5f427726c7e9ca92c17b5fdc3a8b9758161d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Sat, 11 Jan 2020 19:27:25 +0100 Subject: [PATCH] Raise correct error message --- lib/locomotive/steam/liquid/tags/concerns/attributes.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/locomotive/steam/liquid/tags/concerns/attributes.rb b/lib/locomotive/steam/liquid/tags/concerns/attributes.rb index 0e77a747..2ad5e3c8 100644 --- a/lib/locomotive/steam/liquid/tags/concerns/attributes.rb +++ b/lib/locomotive/steam/liquid/tags/concerns/attributes.rb @@ -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