lib/aws/cfn/compiler/mixins/parse.rb in aws-cfn-compiler-0.9.20 vs lib/aws/cfn/compiler/mixins/parse.rb in aws-cfn-compiler-0.9.21
- old
+ new
@@ -117,10 +117,15 @@
# Ruby bricks can now define resources across section boundaries!
item = parse_rb_file(base, section, filename)
elsif filename =~ /\.js(|on)\z/i
item[section].merge! JSON.parse(content)
elsif filename =~ /\.ya?ml\z/i
- item[section].merge! YAML.load(content)
+ begin
+ item[section].merge! YAML.load(content)
+ rescue => e
+ logger.fatal "YAML error: #{e.message}"
+ raise e
+ end
else
next
end
unless item[section].has_key?(base)