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

Create a finer-grained exception hierarchy and use it consistently

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API, Error Handling
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved: