• Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.0
    • None

      I was under the impression that catching `MongoException` was sufficient for error handling driver calls to the database. In cases of network/mongo instability, I'm also seeing `IllegalStateExceptions` which is escaping our normal error handling.

      Would it make sense to have all exceptions extend from `MongoException`? If not, is it possible to publicly document a definitive list of high-level exceptions that can come out of mongo driver calls that all applications are recommended to catch? Is that list limited to `MongoException` and `IllegalArgumentException`? If so, can we guarantee nothing new will be added that doesn't fit that classification or is it recommended for applications to catch `Exception`?

           [java] Exception in thread "Thread-47745" java.lang.IllegalStateException: open
           [java] 	at org.bson.util.Assertions.isTrue(Assertions.java:36)
           [java] 	at com.mongodb.DBTCPConnector.releasePort(DBTCPConnector.java:413)
           [java] 	at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:198)
           [java] 	at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:167)
           [java] 	at com.mongodb.DBCollection.insert(DBCollection.java:161)
           [java] 	at com.xgen.svc.brs.dao.BlockStoreDao.saveBlocks(BlockStoreDao.java:234)
      ...
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: