The MongoDB\Driver\WriteError class

はじめに

The MongoDB\Driver\WriteError class encapsulates information about a write error and may be returned as an array element from MongoDB\Driver\WriteResult::getWriteErrors.

クラス概要

MongoDB\Driver\WriteError
final class MongoDB\Driver\WriteError {
/* プロパティ */
public readonly string $message;
public readonly int $code;
public readonly int $index;
public readonly objectnull $info;
/* メソッド */
final public int getCode()
final public int getIndex()
final public objectnull getInfo()
final public string getMessage()
}

プロパティ

message
The error message.
code
The error code.
index
The index of the write operation within the MongoDB\Driver\BulkWrite that caused the error.
info
Additional information for the error, or null if not available.

変更履歴

バージョン 説明
PECL mongodb 2.3.0 Added public readonly properties.
目次