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

output including file for include tag error #1746

Merged
merged 2 commits into from Nov 23, 2013

Conversation

Projects
None yet
4 participants
@maul-esel
Contributor

maul-esel commented Nov 21, 2013

Title sums it up pretty much.

Fixes #1745.

@@ -87,7 +87,7 @@ def converter
def render_liquid(content, payload, info, path = nil)
Liquid::Template.parse(content).render!(payload, info)
rescue Tags::IncludeTagError => e
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}"
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}, included in #{path || self.path}"
raise e
rescue Exception => e
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{path || self.path}"

This comment has been minimized.

@parkr

parkr Nov 22, 2013

Member

Why do we use e.path above, but not here?

This comment has been minimized.

@maul-esel

maul-esel Nov 22, 2013

Contributor

Because e.path only exists for Tags::IncludeTagError exceptions, where it references the file the error occured in. Other exceptions represent errors in the convertible's file itself, thus self.path (or path for rendering of layouts).

This comment has been minimized.

@parkr

parkr Nov 22, 2013

Member

Thanks for the explanation. 👍

@maul-esel

This comment has been minimized.

Contributor

maul-esel commented Nov 22, 2013

Looking at the tag and @benbalter's issue again, there's something else wrong here. In IncludeTag#render, the rescue clause should not be for the whole method. I'll fix that asap.

restrict rescue-clause in IncludeTag#render
As it previously enclosed the whole method, it also
wrapped file validation errors, which is not meant to be.

Fixes #1745.
@mattr-

This comment has been minimized.

Member

mattr- commented Nov 23, 2013

Cool. Thanks! ❤️

mattr- added a commit that referenced this pull request Nov 23, 2013

Merge pull request #1746 from maul-esel/missing-include
output including file for include tag error

@mattr- mattr- merged commit 7cb44fd into jekyll:master Nov 23, 2013

mattr- added a commit that referenced this pull request Nov 23, 2013

@maul-esel maul-esel deleted the maul-esel:missing-include branch Nov 23, 2013

csim added a commit to csim/jekyll that referenced this pull request Nov 24, 2013

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.