MongoResultException::getDocumentRetrieve the full result document Description
public array MongoResultException::getDocument
( void
)
Retrieves the full error result document. ParametersThis function has no parameters. Return ValuesThe full result document as an array, including partial data if available and additional keys. ExamplesExample #1 MongoResultException::getDocument example
<?phpThe above examples will output something similar to:
$set is not valid for storage.
array(3) {
["lastErrorObject"]=>
array(5) {
["connectionId"]=>
int(6)
["err"]=>
string(30) "$set is not valid for storage."
["code"]=>
int(52)
["n"]=>
int(0)
["ok"]=>
float(1)
}
["ok"]=>
float(0)
["errmsg"]=>
string(30) "$set is not valid for storage."
}
|