[CSHARP-307] Throw more appropriate exception when null is passed to Insert or InsertBatch Created: 22/Aug/11 Updated: 02/Apr/15 Resolved: 29/Aug/11 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.1 |
| Fix Version/s: | 1.2 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
Right now passing a null value as a document to Insert or InsertBatch doesn't get detected as an error client side and results in a confusing error message from the server. The driver will be changed to throw an ArgumentNullException instead. |
| Comments |
| Comment by Robert Stam [ 29/Aug/11 ] |
|
Insert, InsertBatch and Save now throw an ArgumentNullException when passed a null document or batch. InsertBatch throws an ArgumentException when the batch itself is not null but one of the documents in the batch is. |