add new TemplateEncodingError

This commit is contained in:
Michael Go
2024-01-12 12:17:20 -04:00
parent 3ac7e470e6
commit 7b25b770af
3 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ module Liquid
parse_context = configure_options(options)
unless source.valid_encoding?
raise SyntaxError, parse_context.locale.t("errors.syntax.invalid_template_encoding")
raise TemplateEncodingError, parse_context.locale.t("errors.syntax.invalid_template_encoding")
end
tokenizer = parse_context.new_tokenizer(source, start_line_number: @line_numbers && 1)