Permalink
Browse files

Improve error message

`fixture` is an instance of `Object`.

Before:
```
the id property must be defined for fixture [Object object]
```

After:
```
the id property must be defined for fixture {"foo": "bar"}
```
  • Loading branch information...
1 parent 36d2e2a commit 55468063e76902a65caa72763c395768b6344c46 @tricknotes tricknotes committed Mar 13, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 packages/ember-data/lib/adapters/fixture_adapter.js
@@ -30,7 +30,7 @@ DS.FixtureAdapter = DS.Adapter.extend({
var fixtures = Ember.A(type.FIXTURES);
return fixtures.map(function(fixture){
if(!fixture.id){
- throw new Error(fmt('the id property must be defined for fixture %@', [fixture]));
+ throw new Error(fmt('the id property must be defined for fixture %@', [JSON.stringify(fixture)]));
}
fixture.id = fixture.id + '';
return fixture;

0 comments on commit 5546806

Please sign in to comment.