DittoSwiftError
public enum DittoSwiftError : Error
extension DittoSwiftError: LocalizedError
All errors that are thrown by the Ditto SDK are wrapped as a DittoSwiftError. It wraps multiple
different types of error that each have an associated reason.
You can access more specific information about an error by switching over the error’s reason value. If
you want a human-readable version of the error then call localizedDescription on the error’s reason.
- activationError: An error occurred relating to activating the Ditto instance.
- authenticationError: An error occurred relating to authenticating the Ditto instance.
- encryptionError: An error occurred relating to encryption.
- migrationError: An error occurred relating to migrations.
- storeError: An error occurred relating to the store.
- transportError: An error occurred relating to the network transports.
- validationError: An error occurred relating to input validation.
- ioError: An error occurred relating to I/O.
- unsupportedError: Operation is not supported.
-
The possible underlying reasons an
.activationErrorerror occurs.- notActivatedError: The
Dittoinstance has not yet been activated, which is achieved via a successful call tosetAccessLicense. - licenseTokenExpired: The provided license token has expired.
- licenseTokenVerificationFailed: Verification of the provided license token failed.
- licenseTokenUnsupportedFutureVersion: The provided license token is in an unsupported future format.
Declaration
Swift
public enum ActivationErrorReason - notActivatedError: The
-
The possible underlying reasons an
.authenticationErrorerror occurs.- failedToAuthenticate: Failed to authenticate with remote server.
Declaration
Swift
public enum AuthenticationErrorReason -
The possible underlying reasons for encryption errors.
See moreDeclaration
Swift
public enum EncryptionErrorReason -
The possible underlying reasons a
.migrationErrorerror occurs.- disableSyncWithV3Failed: The operation to disable sync with v3 peers failed.
Declaration
Swift
public enum MigrationErrorReason -
The possible underlying reasons a
See more.storeErrorerror occurs.Declaration
Swift
public enum StoreErrorReason -
The possible underlying reasons a
.transportErrorerror occurs.- diagnosticsUnavailable: The request to get transport diagnostics failed.
- failedToDecodeTransportDiagnostics: Decoding of transport diagnostics data failed.
Declaration
Swift
public enum TransportErrorReason -
The possible underlying reasons for validation errors.
See moreDeclaration
Swift
public enum ValidationErrorReason -
The possible underlying reasons for file system errors.
See moreDeclaration
Swift
public enum IOErrorReason -
Undocumented
Declaration
Swift
case activationError(reason: ActivationErrorReason) -
Undocumented
Declaration
Swift
case authenticationError(reason: AuthenticationErrorReason) -
Undocumented
Declaration
Swift
case encryptionError(reason: EncryptionErrorReason) -
Undocumented
Declaration
Swift
case migrationError(reason: MigrationErrorReason) -
Undocumented
Declaration
Swift
case storeError(reason: StoreErrorReason) -
Undocumented
Declaration
Swift
case transportError(reason: TransportErrorReason) -
Undocumented
Declaration
Swift
case validationError(reason: ValidationErrorReason) -
Undocumented
Declaration
Swift
case ioError(reason: IOErrorReason) -
Undocumented
Declaration
Swift
case unsupportedError(message: String) -
Undocumented
Declaration
Swift
case unknownError(message: String) -
Provides a description of the error.
Declaration
Swift
public var errorDescription: String? { get }