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

remove DESTRUCTOR_GUARD

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible
    • ALL
    • Programmability 2025-01-20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This can be replaced with better direct C++ code.

      Problems with this macro that this will solve:

      • It confuses clang-format, which doesn't know that its VA_ARGS are C++ code.
      • It currently does incomplete exception handling (missing boost::exception).
      • It hides a catch(...). It's better for those to be visible, as they're important.
      • It is used outside of destructors often for some reason.
      • It does too much. Users cannot do anything else with the exception. It's gone when they return.

      Replacing it with a function reportFailedDestructor.

      Can remove the destructor_guard.h header and just put this function into assert_util.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None