Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-68

Throw exception when accessing fields in unacknowledged WriteResult

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

      The CRUD API discusses throwing an exception if the user accesses fields on a write result when it is unacknowledged. I'm inclined to either throw a BadMethodCallException or, more generally, a LogicException. I don't consider it a RuntimeException, as it indicates incorrect code and something the developer should know not to do in advance.

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

              Created:
              Updated:
              Resolved: