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

Make MONGO_INITIALIZER functions throw on error

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Service arch 2020-09-21

      These functions rarely return anything but Status::OK(), and many are even no-ops, which makes the requirement to return Status::OK() just unnecessary noise.

      Moreover, returning anything but Status::OK is essentially fatal, so it might as well throw.
      All initializers can be converted very easily.

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

              Created:
              Updated:
              Resolved: