Skip to content

Commit 0245755

Browse files
committed
Merge pull request jsonmodel#317 from huji0624/master
Add error log in initWithCoder.
2 parents 957f24f + c795a5d commit 0245755

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

JSONModel/JSONModel/JSONModel.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,9 @@ -(instancetype)initWithCoder:(NSCoder *)decoder
12771277
{
12781278
NSString* json = [decoder decodeObjectForKey:@"json"];
12791279

1280-
self = [self initWithString:json error:nil];
1280+
JSONModelError *error = nil;
1281+
self = [self initWithString:json error:&error];
1282+
if(error) JMLog(@"%@",[error localizedDescription]);
12811283
return self;
12821284
}
12831285

0 commit comments

Comments
 (0)