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

Unexpected InvalidOperationException in MongoServerInstance.AcquireConnection

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • 2.0
    • 1.4.2
    • None
    • Minor Change

    Description

      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).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: