Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1297

mongocxx code should throw exceptions derived from mongocxx::exception, instead of throwing mongocxx::exception itself

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Most error handling code in mongocxx throws an exception derived from mongocxx::exception, such as mongocxx::logic_error, mongocxx::operation_exception, etc. We should audit the codebase to find the remaining functions that throw mongocxx::exception directly, and replace the exceptions in those throw statements with the appropriate specific exception.

      Also, consider whether gridfs_exception deserves to derive from exception, as it does now, or if it should be a subclass of operation_exception, or just deleted in favor of the existing exceptions.

            Assignee:
            ezra.chung@mongodb.com Ezra Chung
            Reporter:
            backlog-cxx-driver [DO NOT USE] Backlog - CXX Driver Team
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: