[CDRIVER-2708] Assert and document that mongoc_collection_find_and_modify_with_opts requires "opts" Created: 18/Jun/18  Updated: 28/Oct/23  Resolved: 24/Jul/18

Status: Closed
Project: C Driver
Component/s: docs, libmongoc
Affects Version/s: None
Fix Version/s: 1.13.0

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The function will crash if given a NULL opts parameter. Document this and assert it at the top to cause clearer errors when a user makes a mistake. Or else allow NULL opts for consistency with other with_opts functions? That's the more likely answer.



 Comments   
Comment by Githook User [ 24/Jul/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2708 find_and_modify opts cannot be NULL
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/84ef1e81df7e3dc18fd7e67f88267e1aac747da4

Generated at Wed Feb 07 21:16:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.