[SERVER-7076] str::stream should no longer throw exceptions, and be moved to mongo/base from mongo/util/mongoutils. Created: 19/Sep/12  Updated: 14/Apr/16  Resolved: 04/Apr/16

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Andy Schwerin Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 13 (04/22/16)
Participants:

 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.


Generated at Thu Feb 08 03:13:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.