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

Create a finer-grained exception hierarchy and use it consistently

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • API, Error Handling
    • None

    Description

      It's currently rather difficult to handle exceptions thrown by the driver. The driver throws MongoException subclasses like Network in some cases, but not in all cases that it seems like it should. And it throws the generic MongoException in many cases, making it difficult to distinguish. This is particularly important when clients are trying to use the exception type to determine a course of action, like whether to attempt a retry.

      The goal of this ticket is to create a more fine-grained exception hierarchy and to use it consistently.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: