Comment 9 for bug 582246

Revision history for this message
Erwan Loisant (eloisant) wrote : Re: Better error reporting in Fixtures

Gee, there's a lot of issues in your code. As I said you have the wrong name for your entities (or in your YAML file). That causes a correct error message, unless it's hidden by another error. The error that you have is that you didn't indent anything in your yaml file. See examples or doc specific to Yaml.

So I just fixed a null pointer exception that happened when you tried to create an entity with no property set in it, such as simply:

User:

instead of

User:
   name: toto
   url: http://tata.com

I decided to accept it because (1) it's valid YAML and (2) you can actually create a instance with no default argument from Java, so there's no reason to forbid it from fixtures. So it may not be very useful, but it's there.

Obviously you'll still have issues until you indent your file correctly. Feel free to come back to us through the mailing list or the bug tracker if you suspect a bug or see an other area where error reporting can be improved.