Raise an exception when JSON generation functionality doesn't exist.
This commit is contained in:
parent
1f750a36fe
commit
ac811fc5ec
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ static NSData * AFJSONEncode(id object, NSError **error) {
|
||||||
[invocation getReturnValue:&data];
|
[invocation getReturnValue:&data];
|
||||||
} else {
|
} else {
|
||||||
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:NSLocalizedString(@"Please either target a platform that supports NSJSONSerialization or add one of the following libraries to your project: JSONKit, SBJSON, or YAJL", nil) forKey:NSLocalizedRecoverySuggestionErrorKey];
|
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:NSLocalizedString(@"Please either target a platform that supports NSJSONSerialization or add one of the following libraries to your project: JSONKit, SBJSON, or YAJL", nil) forKey:NSLocalizedRecoverySuggestionErrorKey];
|
||||||
[NSException exceptionWithName:NSInternalInconsistencyException reason:NSLocalizedString(@"No JSON generation functionality available", nil) userInfo:userInfo];
|
[[NSException exceptionWithName:NSInternalInconsistencyException reason:NSLocalizedString(@"No JSON generation functionality available", nil) userInfo:userInfo] raise];
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue