Don't crash if no JSON serializer is found, show an error in the log instead

This commit is contained in:
Andreas Linde 2012-03-08 21:18:42 +01:00
parent 07ccb6de00
commit 810ecb84b8

View File

@ -690,13 +690,13 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
[invocation invoke];
[invocation getReturnValue:&feedResult];
} else {
NSLog(@"Error: You need a JSON Framework in your runtime!");
[self doesNotRecognizeSelector:_cmd];
error = [NSError errorWithDomain:kHockeyErrorDomain
code:HockeyAPIServerReturnedEmptyResponse
userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"You need a JSON Framework in your runtime for iOS4!", NSLocalizedDescriptionKey, nil]];
}
#endif
if (error) {
BWHockeyLog(@"Error while parsing response feed: %@", [error localizedDescription]);
[self reportError_:error];
return nil;
}