Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing @throw or incorrect method name #20

Closed
drodriguez opened this issue Apr 25, 2011 · 1 comment
Closed

Missing @throw or incorrect method name #20

drodriguez opened this issue Apr 25, 2011 · 1 comment
Assignees

Comments

@drodriguez
Copy link

As of 862fa4d, line 2793 reads like this:

if((encodeState = (struct JKEncodeState *)calloc(1UL, sizeof(JKEncodeState))) == NULL) { [NSException exceptionWithName:NSMallocException reason:@"Unable to allocate state structure." userInfo:NULL]; return(NULL); }

That, in case of a memory problem will create the exception object and not do anything with it. I think is missing a @throw statement, or creating the exception using a +[NSException raise:format:] method (like is done in the rest of the file).

[NSException raise:NSMallocException format:@"Unable to allocate state structure."]
@johnezang
Copy link
Owner

Not sure how this happened. I'm going to blame autocompletion. :)

aussiegeek added a commit to playup/JSONKit that referenced this issue May 4, 2011
* 'master' of github.com:playup/JSONKit:
  Adds a serializing option to backslash escape forward slashes.  This is for issue johnezang#21.
  Change a NSException from exceptionWithName: to raise:.  Closes johnezang#20.
  Fixes a bug when removing items from a JKDictionary.  Since JKDictionary is implemented using a hash table that uses linear probing, the removal function needs to "re-add" items that follow the removed item so that linear probe hash collisions are not "lost".  Closes johnezang#17
@ghost ghost assigned johnezang May 21, 2011
jasongregori pushed a commit to jasongregori/JSONKit that referenced this issue Sep 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants