Merge pull request #121 from aaronbrethorst/master
Raise an exception if JSON generation capability doesn't exist
This commit is contained in:
commit
c1bc698682
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ static NSData * AFJSONEncode(id object, NSError **error) {
|
|||
[invocation getReturnValue:&data];
|
||||
} 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];
|
||||
[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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue