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

str::stream should no longer throw exceptions, and be moved to mongo/base from mongo/util/mongoutils.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Internal Code
    • None
    • Fully Compatible
    • Platforms 13 (04/22/16)

    Description

      We'd like to always use str::stream for building strings in stream-like fashion. However, code in mongo/base is not supposed to throw exceptions or depend on code from outside mongo/base and mongo/platform.

      This work item would further require moving mongo/bson/util/builder.h into mongo/base, or adding mongo/bson/util to the list of directories that files in base may depend on.

      The exception-freeness part will be much harder, as BufBuilder and StringBuilder throw exceptions in some non-fatal cases, now – particularly, when a buffer grows to be "too large". Some of those cases should perhaps be fatal, but we probably depend on others not being fatal right now.

      Labeling "Medium" time, because of the extensive work needed to make str::stream exception-free.

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: