Don't catch Exception when parsing YAML frontmatter

This commit is contained in:
Ben Hollis 2013-01-27 17:11:54 -08:00
parent 5f84833fc5
commit aa6564f038

View file

@ -70,8 +70,9 @@ module Middleman::CoreExtensions
@cache.delete(path) @cache.delete(path)
end end
YAML_ERRORS = [ Exception, ArgumentError ] YAML_ERRORS = [ StandardError ]
# https://github.com/tenderlove/psych/issues/23
if defined?(Psych) && defined?(Psych::SyntaxError) if defined?(Psych) && defined?(Psych::SyntaxError)
YAML_ERRORS << Psych::SyntaxError YAML_ERRORS << Psych::SyntaxError
end end