You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do an insert or save with a write concern but without a callback, it rightly throws an exception. The problem is that it doesn't throw an exception until much later, much farther in the internals of mongoskin. This means that the exception I get back does not tell me where the line of code is that caused the problem.
This is the line where the exception is thrown:
else if(_hasWriteConcern(errorOptions) && callback == null) {
throw new Error("Cannot use a writeConcern without a provided callback");
}
This is the exception I get:
Something borked: - Error: Cannot use a writeConcern without a provided callback
at insertAll (...\node_modules\mongoskin\node_modules\mongodb\lib\mongodb\collection.js:343:11)
at Collection.insert (...\node_modules\mongoskin\node_modules\mongodb\lib\mongodb\collection.js:92:3)
at EventEmitter.exports.bindSkin.obj.(anonymous function) (...\node_modules\mongoskin\lib\mongoskin\utils.js:68:23)
at EventEmitter.g (events.js:175:14)
at EventEmitter.emit (events.js:98:17)
at SkinCollection.open (...\node_modules\mongoskin\lib\mongoskin\collection.js:129:24)
at Db.collection (...\node_modules\mongoskin\node_modules\mongodb\lib\mongodb\db.js:484:44)
at SkinCollection.open (...\node_modules\mongoskin\lib\mongoskin\collection.js:119:12)
at SkinDb.open (...\node_modules\mongoskin\lib\mongoskin\db.js:79:19)
at SkinCollection.open (...\node_modules\mongoskin\lib\mongoskin\collection.js:114:19)
Either mongoskin or mongodb must have some C++ junk that is blocking the full long-trace from generating. The correct solution would be to make it so whatever is blocking the long-trace does not do that. A more hacky solution would be to check the parameters immediately on call of insert or save so that the exception isn't thrown from the internals.
The text was updated successfully, but these errors were encountered:
When I do an insert or save with a write concern but without a callback, it rightly throws an exception. The problem is that it doesn't throw an exception until much later, much farther in the internals of mongoskin. This means that the exception I get back does not tell me where the line of code is that caused the problem.
This is the line where the exception is thrown:
This is the exception I get:
Either mongoskin or mongodb must have some C++ junk that is blocking the full long-trace from generating. The correct solution would be to make it so whatever is blocking the long-trace does not do that. A more hacky solution would be to check the parameters immediately on call of insert or save so that the exception isn't thrown from the internals.
The text was updated successfully, but these errors were encountered: