Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'BSON_CODE'
engelgabriel opened this issue · comments
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
My error is slightly different:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'class (null) key �
abort() called
terminate called throwing an exception
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;}") }
Should be fixed in 3.0. You can verify this issue, and close it.