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

Throw a more specific version of TimeoutException

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.1.1
    • Component/s: Error Handling
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: