Skip to content

Commit c795a5d

Browse files
committed
Add error log in initWithCoder.
Add error log in initWithCoder.
1 parent e7386f0 commit c795a5d

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)