Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render tag error reporting fix #1669

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dansingerman
Copy link

@dansingerman dansingerman commented Jan 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant