Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47424

Fix inconsistencies in error handling with throwing vs returning Status

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution

      This came up in CR: https://mongodbcr.appspot.com/591890009

      We have some functions reporting errors by throwing where we at a higher level just use Status so we have to catch(...) and return exceptionToStatus()

      It would be nice to clean up and rely more on exceptions.

      Examples:
      https://github.com/mongodb/mongo/blob/2f9f301e0247b059ba652c2488a450f1fbd1d77b/src/mongo/db/index/index_access_method.cpp#L547

      https://github.com/mongodb/mongo/blob/2f9f301e0247b059ba652c2488a450f1fbd1d77b/src/mongo/db/catalog/validate_adaptor.cpp#L142

       

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: