Throw exceptions for BSON (de)serialization errors

XMLWordPrintableJSON

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

      Per the serialization spec, an MongoDB\Driver\Exception\UnexpectedValueException should be thrown when:

      • bsonSerialize() does not return an array or stdClass instance

      An MongoDB\Driver\Exception\InvalidArgumentException should be thrown when:

      • The custom class specified in the type map does not exist, does not implement Unserializable, or is not instantiatable (i.e. it's abstract).

      We don't throw exceptions if the deserialization class inferred by __pclass is unusable (i.e. missing, not Unserializable, or not instantiatable).

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

              Created:
              Updated:
              Resolved: