[CXX-761] Stream builder error for invalid context is unfriendly Created: 03/Dec/15  Updated: 11/Jan/16  Resolved: 08/Dec/15

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Samantha Ritter (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: C++11 Driver MongoDB 3.2

 Description   

If you build an incomplete document with the stream builder, and you try to use it as a view, the error you get is unfriendly:

auto builder = document{} << "key" << "value" << "key";
auto view = builder.view();
 
> "not viewable"



 Comments   
Comment by Githook User [ 08/Dec/15 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: CXX-761 More detailed error for invalid builders
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/351b8439ccccf17fc16259b96849f64bcd785093

Comment by Samantha Ritter (Inactive) [ 07/Dec/15 ]

code review: https://github.com/mongodb/mongo-cxx-driver/pull/390/

Generated at Wed Feb 07 22:00:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.