Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-475

toJSON and fromJSON should throw exceptions on errors

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.0
    • Affects Version/s: 1.0.0-rc0
    • Component/s: None
    • None

      toJSON() should throw UnexpectedValueExceptions (just like toPHP()):

      • Could not read document from BSON reader
      • Reading document did not exhaust input buffer

      fromJSON() should throw an UnexpectedValueException on any error parsing the JSON. For now, it's suitable to simply report the bson_error_t message.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: