Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-752

Make exception message say timeout if exception was caused by a socket timeout exception

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.0
    • Affects Version/s: None
    • Component/s: Monitoring
    • Labels:
      None

      We got the exception below. I think it's caused by a socket timeout, but from the exception message below, it's apparently not possible to know for sure. I would like the MongoException message to be different if the IOException is a SocketTimeoutException. Something like "socket timeout trying to call something" rather than "can't call something".

      Here is the exception. I am not asking for help troubleshooting this exception, I am including it as an example.

      com.mongodb.MongoException$Network: can't call something : (host info removed)
      at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:226)
      at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:313)
      at com.mongodb.DB.command(DB.java:174)
      at com.mongodb.DB.command(DB.java:158)
      at com.mongodb.DB.command(DB.java:198)
      at com.mongodb.DBCollection.getCount(DBCollection.java:899)
      at com.mongodb.DBCollection.getCount(DBCollection.java:870)
      at com.mongodb.DBCollection.getCount(DBCollection.java:858)
      at com.google.code.morphia.query.QueryImpl.countAll(QueryImpl.java:174)

            Assignee:
            Unassigned Unassigned
            Reporter:
            jfeibusc@ebay.com John Feibusch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: