-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.1.8
-
Component/s: None
-
None
As of PHPC-460, the _construct(), set_state(), and _wakeup() methods in BSON classes use the same init functions. Those init functions should be responsible for throwing exceptions (they currently just return true/false) to ensure consistent error reporting for each method of instantiating a BSON object.
This is not a concern for MongoDB\BSON\toPHP(), as they would already throw for invalid BSON data.