Table of Contents

Class MongoWriteConcernException

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Core.dll

Represents a MongoDB write concern exception.

[Serializable]
public class MongoWriteConcernException : MongoCommandException, ISerializable
Inheritance
MongoWriteConcernException
Implements
Derived
Inherited Members

Constructors

MongoWriteConcernException(ConnectionId, string, WriteConcernResult)

Initializes a new instance of the MongoWriteConcernException class.

public MongoWriteConcernException(ConnectionId connectionId, string message, WriteConcernResult writeConcernResult)

Parameters

connectionId ConnectionId

The connection identifier.

message string

The error message.

writeConcernResult WriteConcernResult

The command result.

MongoWriteConcernException(SerializationInfo, StreamingContext)

Initializes a new instance of the MongoWriteConcernException class.

public MongoWriteConcernException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo.

context StreamingContext

The StreamingContext.

Properties

MappedWriteConcernResultException

Gets the mapped write concern result exception.

public Exception MappedWriteConcernResultException { get; }

Property Value

Exception

WriteConcernResult

Gets the write concern result.

public WriteConcernResult WriteConcernResult { get; }

Property Value

WriteConcernResult

The write concern result.

Methods

GetObjectData(SerializationInfo, StreamingContext)

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo
context StreamingContext

IsWriteConcernErrorOnly()

Determines whether the exception is due to a write concern error only.

public bool IsWriteConcernErrorOnly()

Returns

bool

true if the exception is due to a write concern error only; otherwise, false.