The MongoDB\Driver\WriteConcernError class

Introduction

The MongoDB\Driver\WriteConcernError class encapsulates information about a write concern error and may be returned by MongoDB\Driver\WriteResult::getWriteConcernError.

Class synopsis

MongoDB\Driver\WriteConcernError
final class MongoDB\Driver\WriteConcernError {
/* Properties */
public readonly string $message;
public readonly int $code;
public readonly objectnull $info;
/* Methods */
final public int getCode()
final public objectnull getInfo()
final public string getMessage()
}

Properties

message
The error message.
code
The error code.
info
Additional information for the error, or null if not available.

Changelog

Version Description
PECL mongodb 2.3.0 Added public readonly properties.
Table of Contents