mirror of
https://github.com/lux-tel/session-ios.git
synced 2026-10-30 20:38:32 +00:00
• Added the new MessageDeduplication table • Added a migration to populate the MessageDeduplication table • Added ExtensionHelper functions to store records in the AppGroup for deduplication purposes • Updated the logic to use MessageDeduplication table & files for deduplication purposes • Refactored message parsing to not rely on the database • Refactored message deduplication to not rely on the database in the PN extension • Removed the old ControlMessageProcessRecord table
30 lines
879 B
Swift
30 lines
879 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
public enum StorageError: Error {
|
|
case generic
|
|
case databaseInvalid
|
|
case databaseSuspended
|
|
case startupFailed
|
|
case migrationFailed
|
|
case migrationNoLongerSupported
|
|
case decodingFailed
|
|
case invalidQueryResult
|
|
|
|
/// This error is thrown when a synchronous operation takes longer than `Storage.transactionDeadlockTimeoutSeconds`,
|
|
/// the assumption being that if we know an operation is going to take a long time then we should probably be handling it asynchronously
|
|
/// rather than a synchronous way
|
|
case transactionDeadlockTimeout
|
|
case validStorageIncorrectlyHandledAsError
|
|
|
|
case failedToSave
|
|
case objectNotFound
|
|
case objectNotSaved
|
|
|
|
case invalidSearchPattern
|
|
case invalidData
|
|
|
|
case devRemigrationRequired
|
|
}
|