diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-06 10:16:38 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-06 10:16:38 +0000 |
commit | 169eb781f1e1440bf8196a50d6b113a82707ed43 (patch) | |
tree | c8ed6de1d4ec680d7299d2ba71f0e2deb0e8bf69 /activerecord/lib/active_record/fixtures.rb | |
parent | 17f7f8a091657a2192106668f00e74c6d70c0614 (diff) | |
download | rails-169eb781f1e1440bf8196a50d6b113a82707ed43.tar.gz rails-169eb781f1e1440bf8196a50d6b113a82707ed43.tar.bz2 rails-169eb781f1e1440bf8196a50d6b113a82707ed43.zip |
Fixed that Yaml error message in fixtures hid the real error #1623 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/fixtures.rb')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 47928201c7..dab719946f 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -288,7 +288,7 @@ class Fixtures < Hash yaml = YAML::load(erb_render(IO.read(yaml_file_path))) yaml.each { |name, data| self[name] = Fixture.new(data, @class_name) } if yaml rescue Exception=>boom - raise Fixture::FormatError, "a YAML error occured 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" + raise Fixture::FormatError, "a YAML error occured 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 #{boom.class}: #{boom}" end elsif File.file?(csv_file_path) # CSV fixtures |