From ac811fc5ecc990dc7d315b24eaf4952192dedec3 Mon Sep 17 00:00:00 2001 From: Aaron Brethorst Date: Mon, 21 Nov 2011 11:57:04 -0800 Subject: [PATCH] Raise an exception when JSON generation functionality doesn't exist. --- AFNetworking/AFJSONUtilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AFNetworking/AFJSONUtilities.h b/AFNetworking/AFJSONUtilities.h index bde5b75..2fb59a8 100644 --- a/AFNetworking/AFJSONUtilities.h +++ b/AFNetworking/AFJSONUtilities.h @@ -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;