-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSON] Leave json::OStream in valid state on failure (#7684)
Make sure that calls to begin/end functions are balanced even when an error occurs. This leaves the `json::OStream` object in a valid state and allows surrounding code to handle the failure gracefully. Otherwise an assertion in the destructor of `json::OStream` would fire because of unclosed JSON scopes.
- Loading branch information
1 parent
4e7c906
commit 307160c
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters