I have a method which can return nil. If it doesn't return nil, it should replace a local variable:
NSString *errorMsg = error.localizedDescription;
if([self errorMsgFromErrorCode:error.code]) {
errorMsg = [self errorMsgFomErrorCode:error.code];
}
Is there a smarter more compact way to do this without having to call this helper method twice?