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

Unexpected InvalidOperationException in MongoServerInstance.AcquireConnection

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 2.0
    • Affects Version/s: 1.4.2
    • Component/s: None
    • Minor Change

      Currently, when server goes offline and background monitoring marks server as disconnected, the attempt to acquire connection from this server leads to an InvalidOperationException("Server instance

      {0}

      is no longer connected."). While technically this is correct (InvalidOperationException is perfectly fine when object's internal state is unexpected), MongoConnectionException would be much better in terms of uniformness (connection failed in one way or another, hence the MongoConnectionException).

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: