Skip to content

Commit

Permalink
preserve the backtrace of the exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Sep 1, 2011
1 parent e46c4f1 commit e6fd4ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/fixtures.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def yaml_fixtures_key(path)
def parse_yaml_string(fixture_content) def parse_yaml_string(fixture_content)
YAML::load(erb_render(fixture_content)) YAML::load(erb_render(fixture_content))
rescue *RESCUE_ERRORS => error rescue *RESCUE_ERRORS => error
raise Fixture::FormatError, "a YAML error occurred parsing #{yaml_file_path}. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at http://www.yaml.org/faq.html\nThe exact error was:\n #{error.class}: #{error}" raise Fixture::FormatError, "a YAML error occurred parsing #{yaml_file_path}. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at http://www.yaml.org/faq.html\nThe exact error was:\n #{error.class}: #{error}", error.backtrace
end end


def erb_render(fixture_content) def erb_render(fixture_content)
Expand Down

0 comments on commit e6fd4ed

Please sign in to comment.