The MongoDB\Driver\WriteError class

(mongodb >=1.0.0)

Giriş

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

Sınıf Sözdizimi

final class MongoDB\Driver\WriteError {
/* Özellikler */
public readonly string $message;
public readonly int $code;
public readonly int $index;
public readonly ?object $info;
/* Yöntemler */
final public function getCode(): int
final public function getIndex(): int
final public function getInfo(): ?object
final public function getMessage(): string
}

Özellikler

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.

Sürüm Bilgisi

Sürüm: Açıklama
PECL mongodb 2.3.0 Added public readonly properties.

İçindekiler

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top