Class MongoServerException
Represents a MongoDB server exception.
[Serializable]
public class MongoServerException : MongoException, ISerializable
- Inheritance
-
MongoServerException
- Implements
- Derived
- Inherited Members
Constructors
MongoServerException(ConnectionId, string)
Initializes a new instance of the MongoServerException class.
public MongoServerException(ConnectionId connectionId, string message)
Parameters
connectionId
ConnectionIdThe connection identifier.
message
stringThe error message.
MongoServerException(ConnectionId, string, Exception)
Initializes a new instance of the MongoServerException class.
public MongoServerException(ConnectionId connectionId, string message, Exception innerException)
Parameters
connectionId
ConnectionIdThe connection identifier.
message
stringThe error message.
innerException
ExceptionThe inner exception.
MongoServerException(SerializationInfo, StreamingContext)
Initializes a new instance of the MongoServerException class.
public MongoServerException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo.
context
StreamingContextThe StreamingContext.
Properties
ConnectionId
Gets the connection identifier.
public ConnectionId ConnectionId { get; }
Property Value
Methods
AddErrorLabelsFromCommandResult(MongoServerException, BsonDocument)
Adds error labels from a command result document into the top-level label list.
protected static void AddErrorLabelsFromCommandResult(MongoServerException exception, BsonDocument result)
Parameters
exception
MongoServerExceptionThe exception.
result
BsonDocumentThe result document.
GetObjectData(SerializationInfo, StreamingContext)
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfocontext
StreamingContext