Missing @throw or incorrect method name #20

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

Comments

Projects
None yet
2 participants
@drodriguez

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 johnezang closed this in e1cb174 Apr 25, 2011

@johnezang

This comment has been minimized.

Show comment
Hide comment
@johnezang

johnezang Apr 25, 2011

Owner

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

Owner

johnezang commented Apr 25, 2011

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

Merge branch 'master' of github.com:playup/JSONKit
* 'master' of github.com:playup/JSONKit:
  Adds a serializing option to backslash escape forward slashes.  This is for issue #21.
  Change a NSException from exceptionWithName: to raise:.  Closes #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 #17

@ghost ghost assigned johnezang May 21, 2011

jasongregori added 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