session-ios/SessionMessagingKit/Sending & Receiving/Errors/AttachmentError.swift
Morgan Pretty 3f062c044c Added back the majority of the ConversationVC interactions
Removed some more legacy code
Added back logic similar to the pre-processing de-duping logic (was resulting in "unsent" messages reappearing)
Added a number of updated view files
2022-05-12 17:28:27 +10:00

22 lines
677 B
Swift

// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
import Foundation
public enum AttachmentError: LocalizedError {
case invalidStartState
case noAttachment
case notUploaded
case invalidData
case encryptionFailed
public var errorDescription: String? {
switch self {
case .invalidStartState: return "Cannot upload an attachment in this state."
case .noAttachment: return "No such attachment."
case .notUploaded: return "Attachment not uploaded."
case .invalidData: return "Invalid attachment data."
case .encryptionFailed: return "Couldn't encrypt file."
}
}
}