I have the following code:
@try { NSSet *set = [NSKeyedUnarchiver unarchiveObjectWithData:mData]; } @catch (NSException *exception) {
At some point, it seems that I was not archived correctly, and mData
corrupted. This gives me the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x14, 0xffffff9a, 0xffffffd0, 0x1d, 0x9, 0x3d, 0x43, 0x3)' *** Call stack at first throw:
If the try / catch block does not work, how can I check the exception here? Shouldn't that work?
Thanks.
source share