liquid
liquid copied to clipboard
Render tag error reporting fix
Problem
Parsing errors raised in partials called by render
tags report the error on the calling template name. What is further confusing is the line number is for the correct template name.
So you may get an error message like
Liquid syntax error (foo line 4): Unknown tag 'undefined'
when the error is on line 4 of bar
Solution
Catch the exception in the render tag and add the template name before re-raising.