Permalink
Browse files

preserve the backtrace of the exception

  • Loading branch information...
1 parent e46c4f1 commit e6fd4ed3148f648799de6c6e51601337c88060cb @tenderlove tenderlove committed Sep 1, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/fixtures.rb
@@ -724,7 +724,7 @@ def yaml_fixtures_key(path)
def parse_yaml_string(fixture_content)
YAML::load(erb_render(fixture_content))
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
def erb_render(fixture_content)

0 comments on commit e6fd4ed

Please sign in to comment.