Unexpected InvalidOperationException in MongoServerInstance.AcquireConnection

XMLWordPrintableJSON

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

      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
              Reporter:
              Aristarkh Zagorodnikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: