MongoError class
Represents an error returned by this driver.
Instances of this class and its sub-classes will be returned to represent failure of operations performed by this driver.
The following sub-classes are thrown to represent specific types of errors:
- MongoNoDocumentsError when no document is found and one is required for the operation.
- MongoDuplicateKeyError when an attempt is made to insert a document in violation of the _id key or an unique index.
- MongoNetworkError when there is a network error.
- MongoTimeoutError when an attempt to complete an operation times out.
Other cases will be represented by an instance of this class.
Constructors
- MongoError({required String message})
- MongoError.fromProto(MongoError pError)
-
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited