Merge pull request #1007 from michaelklishin/patch-1
Catch all exceptions, not just StandardError descendents
This commit is contained in:
commit
1f02150ee9
|
@ -34,10 +34,10 @@ module Jekyll
|
||||||
self.content = $POSTMATCH
|
self.content = $POSTMATCH
|
||||||
self.data = YAML.safe_load($1)
|
self.data = YAML.safe_load($1)
|
||||||
end
|
end
|
||||||
rescue => e
|
|
||||||
puts "Error reading file #{File.join(base, name)}: #{e.message}"
|
|
||||||
rescue SyntaxError => e
|
rescue SyntaxError => e
|
||||||
puts "YAML Exception reading #{File.join(base, name)}: #{e.message}"
|
puts "YAML Exception reading #{File.join(base, name)}: #{e.message}"
|
||||||
|
rescue Exception => e
|
||||||
|
puts "Error reading file #{File.join(base, name)}: #{e.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
self.data ||= {}
|
self.data ||= {}
|
||||||
|
@ -75,7 +75,7 @@ module Jekyll
|
||||||
# Returns the converted content
|
# Returns the converted content
|
||||||
def render_liquid(content, payload, info)
|
def render_liquid(content, payload, info)
|
||||||
Liquid::Template.parse(content).render!(payload, info)
|
Liquid::Template.parse(content).render!(payload, info)
|
||||||
rescue => e
|
rescue Exception => e
|
||||||
Jekyll::Logger.error "Liquid Exception:", "#{e.message} in #{payload[:file]}"
|
Jekyll::Logger.error "Liquid Exception:", "#{e.message} in #{payload[:file]}"
|
||||||
e.backtrace.each do |backtrace|
|
e.backtrace.each do |backtrace|
|
||||||
puts backtrace
|
puts backtrace
|
||||||
|
|
Loading…
Reference in New Issue