-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
phongo_cursor_advance_and_check_for_error() should use mongoc_cursor_error_document() instead of mongoc_cursor_error(), as the former exposes data that can be used to populate the result document and/or error labels on an exception.
Currently, executeQuery() is limited to throwing a ServerException on server errors, which does not include the result document. With this change, phongo_cursor_advance_and_check_for_error can start using phongo_throw_exception_from_bson_error_t_and_reply() to throw a CommandException and make the result document accessible to the user.
While 1.5.x does not expose error labels on RuntimeExceptions (PHPC-1222), this change will also ensure that query errors expose error labels in 1.6.0, which will be helpful for applications utilizing transactions.
- is depended on by
-
PHPLIB-365 Implement test runner for transaction spec tests
- Closed
- is related to
-
CDRIVER-1110 Add mongoc_cursor_get_error_document ()
- Closed