Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1523

Throw a more specific version of TimeoutException

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.1.1
    • Component/s: Error Handling
    • Labels:
      None
    • Minor Change

      Hello!
      I ask you to consider throwing a specific subclass of TimeoutException (i.e. MongoTimeoutException) instead of the TimeoutException itself to aid debugging and external failover. Throwing TimeoutException makes it harder to differentiate mongo-specific (pool timeouts, etc.) timeouts from timeouts in user code. Throwing a subclass should not break backwards compatibility since existing catch handlers, "as" tests and proper type testing (Type.IsAssignableFrom) will continue to work properly. The sites to consider are connection stream factory, cluster manager and connection pooling code.
      Thank you.

            Assignee:
            Unassigned Unassigned
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: