|
update : 2015.11.03
php.shukuma.com검색:
|
MongoDB\Driver\Exception\WriteException::getWriteResult(mongodb >= 1.0.0) MongoDB\Driver\Exception\WriteException::getWriteResult — Returns the WriteResult for the failed write operation 설명
final public MongoDB\Driver\WriteResult MongoDB\Driver\WriteException::getWriteResult
( void
)
Returns the MongoDB\Driver\WriteResult for the failed write operation. The MongoDB\Driver\WriteResult::getWriteErrors() and MongoDB\Driver\WriteResult::getWriteConcernError() methods may be used to get more details about the failure. 인수이 함수는 인수가 없습니다. 반환값The MongoDB\Driver\WriteResult for the failed write operation. 예제Example #1 MongoDB\Driver\WriteException::getWriteResult() example
<?php위 예제의 출력 예시:
array(1) {
[0]=>
object(MongoDB\Driver\WriteError)#5 (4) {
["message"]=>
string(70) "E11000 duplicate key error index: db.collection.$_id_ dup key: { : 1 }"
["code"]=>
int(11000)
["index"]=>
int(1)
["info"]=>
NULL
}
}
참고
|