Advancing cursor should check for errors

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 0.4.1
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the 1.x driver, where MongoCursor is an Iterator, each call to next() when iterating through the cursor will invoke php_mongo_handle_error(). Phongo's move_forward iterator handle currently does not check for errors if mongoc_cursor_next() returns false. Errors are only caught when the query or command is first executed.

      One possible way to test for this might be killing a cursor between getmore calls. The current code would simply not return more results, while we would actually expect an exception for issuing a getmore on an invalid cursor ID.

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: