RuntimeError

public enum RuntimeError : MongoError

The possible errors that can occur unexpectedly during runtime.

  • Thrown when the driver encounters a internal error not caused by the user. This is usually indicative of a bug or system related failure (e.g. during memory allocation).

    Declaration

    Swift

    case internalError(message: String)
  • Thrown when encountering a connection or socket related error. May contain labels providing additional information on the nature of the error.

    Declaration

    Swift

    case connectionError(message: String, errorLabels: [String]?)
  • Thrown when encountering an authentication related error (e.g. invalid credentials).

    Declaration

    Swift

    case authenticationError(message: String)
  • Thrown when trying to use a feature that the deployment does not support.

    Declaration

    Swift

    case compatibilityError(message: String)
  • Declaration

    Swift

    public var errorDescription: String? { get }