|
MongoDB\Driver\Exception\BulkWriteCommandException::getWriteConcernErrorsReturns any write concern errors Description
final public array MongoDB\Driver\Exception\BulkWriteCommandException::getWriteConcernErrors()
ParametersThis function has no parameters. Return ValuesAn array of any MongoDB\Driver\WriteConcernErrors that occurred while executing the bulk write. This list may have multiple items if more than one server command was required to execute the bulk write. ExamplesExample #1 MongoDB\Driver\Exception\BulkWriteCommandException::getWriteConcernErrors example
The above example will output something similar to: array(1) { [0]=> object(MongoDB\Driver\WriteConcernError)#6 (3) { ["message"]=> string(29) "Not enough data-bearing nodes" ["code"]=> int(100) ["info"]=> object(stdClass)#8 (1) { ["writeConcern"]=> object(stdClass)#7 (3) { ["w"]=> int(50) ["wtimeout"]=> int(0) ["provenance"]=> string(14) "clientSupplied" } } } } See Also
|