BSON iterator exceptions cannot be caught

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • PHP Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      When an exception is thrown by Document::fromBSON() or by toPHP(), there is no way to advance the cursor.

      The BSON is parsed into a Document in the advance() method before actually advancing.

      IMO the parsing should be done in the current(), which can be easily caught and ignored, allowing the cursor to move on.

      I got the following error: Detected corrupt BSON data for field path 'extra.debug_data_from_embedded.0.K' at offset 0

            Assignee:
            Andreas Braun
            Reporter:
            CESARE GIANNETTI
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: