Ok founded why error didn't get there.
Come from NSValueTransformer+MTLPredefinedTransformerAdditions.m
line 57

 return [MTLJSONAdapter modelOfClass:modelClass
fromJSONDictionary:JSONDictionary
error:NULL];


it's hardcoded to null.





On Tue, May 13, 2014 at 6:12 PM, Vincent YSMAL <vincent.ysmal@gmail.com>wrote:

> Ok thx for the error parameter, didn't get that point, thx for your
> highlight.
> I need to check why my error object didn't goes through.
>
> I'll try to make a test case.
>
> Thx for you help
>
>
> On Tue, May 13, 2014 at 5:59 PM, Robert Böhnke <notifications@github.com>wrote:
>
>> In Mantle/MTLJSONAdapter.m:
>>
>> > @@ -102,7 +103,24 @@ - (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)mo
>> >
>> >  	NSMutableDictionary *dictionaryValue = [[NSMutableDictionary alloc] initWithCapacity:JSONDictionary.count];
>> >
>> > -	for (NSString *propertyKey in [self.modelClass propertyKeys]) {
>> > +	NSSet *propertyKeys = [self.modelClass propertyKeys];
>> > +
>> > +	for (NSString *JSONKeyPath in self.JSONKeyPathsByPropertyKey) {
>> > +		if ([propertyKeys containsObject:JSONKeyPath]) continue;
>> > +
>> > +		if (error != NULL) {
>>
>>  Not sure about the explanation on property mapping. While doing debug
>> step by step because i didn't have anymore my json mapped to object i reach
>> the case where server response have a field in JSON "bar", which i didn't
>> use in my Model on my app, and the debug goes to line 150.
>>
>> Odd, do you have a test case you could put into a gist?
>>
>> The error variable is an argument to the method of type NSError **. If
>> the user passes in NULL, we wouldn't know where to store the reference
>> to the error object we're creating. Again, this will change anyway.
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/Mantle/Mantle/pull/294/files#r12591508>
>> .
>>
>
>