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

Using the no-impl version of catalog-related classes should provide a better error message

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-rc0
    • Component/s: Internal Code
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      When the registerXX() function hasn't been called as a result of not linking in the library containing the corresponding MONGO_INITIALIZER, a std::bad_function_call exception is thrown that doesn't provide any useful context toward remediation steps.

      Note: I'm filing this improvement request on behalf of Xiangyu Yao; he encountered this issue while trying to define a target for C++ unit tests of the AutoGetXX RAII types. It would have been nice if the exception provided more context to have immediately realized that a library dependency was missing.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              adam.martin ADAM Martin (Inactive)
              Reporter:
              max.hirschhorn Max Hirschhorn
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: