From e1cb174753ae0a5e4a549350c6f697a912216437 Mon Sep 17 00:00:00 2001 From: John Engelhart Date: Mon, 25 Apr 2011 16:14:55 -0400 Subject: [PATCH] Change a NSException from exceptionWithName: to raise:. Closes #20. --- JSONKit.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONKit.m b/JSONKit.m index cf32dd3..4b5b4dd 100644 --- a/JSONKit.m +++ b/JSONKit.m @@ -2790,7 +2790,7 @@ - (id)serializeObject:(id)object options:(JKSerializeOptionFlags)optionFlags enc id returnObject = NULL; if(encodeState != NULL) { [self releaseState]; } - if((encodeState = (struct JKEncodeState *)calloc(1UL, sizeof(JKEncodeState))) == NULL) { [NSException exceptionWithName:NSMallocException reason:@"Unable to allocate state structure." userInfo:NULL]; return(NULL); } + if((encodeState = (struct JKEncodeState *)calloc(1UL, sizeof(JKEncodeState))) == NULL) { [NSException raise:NSMallocException format:@"Unable to allocate state structure."]; return(NULL); } if((error != NULL) && (*error != NULL)) { *error = NULL; }