Table of Contents

Class MongoCommandException

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Represents a MongoDB command exception.

public class MongoCommandException : MongoServerException, ISerializable
Inheritance
MongoCommandException
Implements
Derived
Inherited Members

Constructors

MongoCommandException(ConnectionId, string, BsonDocument)

Initializes a new instance of the MongoCommandException class.

MongoCommandException(ConnectionId, string, BsonDocument, BsonDocument)

Initializes a new instance of the MongoCommandException class.

MongoCommandException(ConnectionId, string, BsonDocument, BsonDocument, Exception)

Initializes a new instance of the MongoCommandException class.

MongoCommandException(SerializationInfo, StreamingContext)

Initializes a new instance of the MongoCommandException class.

Properties

Code

Gets the error code.

CodeName

Gets the name of the error code.

Command

Gets the command.

ErrorMessage

Gets the error message.

Result

Gets the command result.

Methods

GetObjectData(SerializationInfo, StreamingContext)

When overridden in a derived class, sets the SerializationInfo with information about the exception.