Skip to content

Commit

Permalink
Issue 167: provide context for yaml parser errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maxandersen committed Sep 1, 2012
1 parent 6f09d06 commit bbb16c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/awestruct/handlers/front_matter_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,14 @@ def parse_parts
@content_line_offset = -1
end

@front_matter = YAML.load( yaml_content ) || {}
begin
@front_matter = YAML.load( yaml_content ) || {}
rescue => e
puts "could not parse #{relative_source_path}"
puts e
puts e.backtrace
end

@parsed_parts = true

end
Expand Down

0 comments on commit bbb16c0

Please sign in to comment.