I have the following code fragment:
NSString* value = @\"value\";
NSString* key = @\"key\";
NSMutableDictionary* foo = [NSMutableDictionary dictionary];
NSDictio
I end up using @try catch but it only fires once. So it works like this
NSMutableDictionary *valuesByIdMutable = (id)self.valuesById;
simplest_block block = ^{
[valuesByIdMutable setObject:obj forKey:key];
};
@try {
block();
} @catch (NSException *exception) {
self.valuesById = valuesByIdMutable = [valuesByIdMutable mutableCopy];
block();
}