[CXX-1151] bsoncxx::builder::core::view_document() and bsoncxx::builder::core::view_array() should throw when builder top-level BSON datum type is incorrect Created: 01/Dec/16 Updated: 16/Dec/16 Resolved: 16/Dec/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Minor Change |
| Description |
|
bsoncxx::builder::core::extract_document() throws bsoncxx::exception when called on a builder where the top-level BSON datum type is an array. Similarly, bsoncxx::builder::core::extract_array() throws when called on a builder where the top-level BSON datum type is a document. bsoncxx::builder::core::view_document() and bsoncxx::builder::core::view_array() should similarly throw in these error cases. |
| Comments |
| Comment by Githook User [ 16/Dec/16 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: For parity with core builder methods extract_document() and |