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

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'BSON_CODE' #120

Closed
engelgabriel opened this issue May 28, 2014 · 3 comments

Comments

@engelgabriel
Copy link

When I try to do a find in any collection that has a document with a property of type BSON_CODE:

{
    "_id" : ObjectId("52fd133f0cf263faa13b3c7e"),
    "helpers" : {
        "test" : function (a){return a+1;}
    }
}

The app crashes:

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'BSON_CODE'
terminating with uncaught exception of type NSException
abort() called

@vinny2020
Copy link

My error is slightly different:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'class (null) key �
abort() called
terminate called throwing an exception

@jeromelebel
Copy link
Owner

Sorry, I never implemented the functions in a document. I'm going to do that soon.

But I don't have javascript parser, so I will probably do something like : { "test": Function("function (a){return a+1;}") }

@jeromelebel
Copy link
Owner

Should be fixed in 3.0. You can verify this issue, and close it.

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

3 participants