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
This commit is contained in:
David Heinemeier Hansson
2005-07-06 10:16:38 +00:00
parent 17f7f8a091
commit 169eb781f1
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*1.11.0* (5th July, 2005)
* Fixed that Yaml error message in fixtures hid the real error #1623 [Nicholas Seckar]
* Changed logging of SQL statements to use the DEBUG level instead of INFO
* Added new Migrations framework for describing schema transformations in a way that can be easily applied across multiple databases #1604 [Tobias Luetke] See documentation under ActiveRecord::Migration and the additional support in the Rails rakefile/generator.

View File

@@ -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