MongoError
public enum MongoError
Namespace containing all the error types introduced by this driver and their dependent types.
-
A MongoDB server error code.
Declaration
Swift
public typealias ServerErrorCode = Int
-
Thrown when commands experience errors on the server that prevent execution.
See moreDeclaration
Swift
public struct CommandError : MongoServerError
-
An error that is thrown when a single write command fails on the server.
See moreDeclaration
Swift
public struct WriteError : MongoServerError
-
A error that ocurred while executing a bulk write.
See moreDeclaration
Swift
public struct BulkWriteError : MongoServerError
-
An error thrown when the driver is incorrectly used.
See moreDeclaration
Swift
public struct LogicError : MongoUserError
-
An error thrown when the user passes in invalid arguments to a driver method.
See moreDeclaration
Swift
public struct InvalidArgumentError : MongoUserError
-
An error thrown when the driver encounters a internal error not caused by the user. This is usually indicative of a bug in the driver or system related failure (e.g. memory allocation failure).
See moreDeclaration
Swift
public struct InternalError : MongoRuntimeError
-
An error thrown when encountering a connection or socket related error. May contain labels providing additional information on the nature of the error.
See moreDeclaration
Swift
public struct ConnectionError : MongoRuntimeError, MongoLabeledError
-
An error thrown when encountering an authentication related error (e.g. invalid credentials).
See moreDeclaration
Swift
public struct AuthenticationError : MongoRuntimeError
-
An error thrown when trying to use a feature that the deployment does not support.
See moreDeclaration
Swift
public struct CompatibilityError : MongoRuntimeError
-
An error that occured when trying to select a server (e.g. a timeout, or no server matched read preference).
See moreDeclaration
Swift
public struct ServerSelectionError : MongoRuntimeError
-
A struct to represent a single write error not resulting from an executed write operation.
See moreDeclaration
Swift
public struct WriteFailure : Codable
-
A struct to represent a write concern error resulting from an executed write operation.
See moreDeclaration
Swift
public struct WriteConcernFailure : Codable
-
A struct to represent a write error resulting from an executed bulk write.
See moreDeclaration
Swift
public struct BulkWriteFailure : Codable