[CSHARP-816] Extend WriteConcernException Created: 10/Sep/13  Updated: 05/Apr/19  Resolved: 23/Jan/14

Status: Closed
Project: C# Driver
Component/s: Feature Request
Affects Version/s: 1.8.2
Fix Version/s: 1.9

Type: Task Priority: Minor - P4
Reporter: Giampiero Schiavi Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Software development



 Description   

It's possible to extend the "write concern exception" to simply manage of the basics errors for "duplicated key" and "network problems" as implemented into java drivers with: MongoException.DuplicateKey and MongoException.Network?
It will be very usefull on sharding environment to manage failover situations



 Comments   
Comment by Githook User [ 23/Jan/14 ]

Author:

{u'username': u'craiggwilson', u'name': u'Craig Wilson', u'email': u'craiggwilson@gmail.com'}

Message: CSHARP-816: added support for throwing duplicate key exceptions when returned from mongos.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/13a5276f418983dbe248e779408d214b91c1f88b

Comment by Craig Wilson [ 17/Jan/14 ]

Need to handle duplicate key exception when talking with mongos, since it doesn't return error codes.

Comment by auto [ 31/Oct/13 ]

Author:

{u'username': u'craiggwilson', u'name': u'Craig Wilson', u'email': u'craiggwilson@gmail.com'}

Message: CSHARP-816: added MongoDuplicateKeyException.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/22900310e0da200eddbc63abe418587e7672cd16

Comment by Craig Wilson [ 10/Sep/13 ]

Yes, it is possible to do this. We actually have this done for our next major release but will look into porting this back to the 1.x branch. Not sure about the network one, but we can definitely do the duplicate key.

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