-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.4.2
-
Component/s: Error Handling
-
None
-
(copied to CRM)
-
Major Change
In some cases the C# driver is not throwing the most appropriate exception. This task is a high level one to review all the exceptions being thrown by the C# driver to verify that the correct type is being thrown and that the error message is appropriate.
Several other JIRAs that refer to specific instances of exceptions that are being questioned are linked to this JIRA.
Note that changing the type of an exception thrown is a breaking change because code written to catch the exception will no longer catch it when the type changes. Changing the error message is also potentially a breaking change because sometimes user code inspects the text of the error message.
- duplicates
-
CSHARP-506 Throw better exception when comparing a non-nullable field to a nullable value
- Closed
- is depended on by
-
CSHARP-691 UpdateBuilder.Set throws InvalidOperationException when Set twice with the same element.
- Closed
- is related to
-
CSHARP-689 Incorrect error message from ObjectId.Unpack()
- Closed
- related to
-
CSHARP-534 MongoServerInstance.AcquireConnection throws InvalidOperationException
- Closed
-
CSHARP-155 Support for error codes in command results and exceptions
- Closed
-
CSHARP-153 Wrapping internal communication exceptions
- Closed
-
CSHARP-393 MongoConnectionPool should throw some kind of MongoException (MongoConnectionException?) instead of TimeoutException
- Closed
-
CSHARP-473 Unexpected InvalidOperationException in MongoServerInstance.AcquireConnection
- Closed
-
CSHARP-463 Unexpected and not documented exception in MongoDatabase.CreateCollection(String, IMongoCollectionOptions)
- Closed