mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
Swift
30 lines
1.1 KiB
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
//
|
|
// stringlint:disable
|
|
|
|
import Foundation
|
|
|
|
public enum DisplayPictureError: LocalizedError {
|
|
case imageTooLarge
|
|
case writeFailed
|
|
case databaseChangesFailed
|
|
case encryptionFailed
|
|
case uploadFailed
|
|
case uploadMaxFileSizeExceeded
|
|
case invalidCall
|
|
case invalidFilename
|
|
|
|
var localizedDescription: String {
|
|
switch self {
|
|
case .imageTooLarge: return "Display picture too large."
|
|
case .writeFailed: return "Display picture write failed."
|
|
case .databaseChangesFailed: return "Failed to save display picture to database."
|
|
case .encryptionFailed: return "Display picture encryption failed."
|
|
case .uploadFailed: return "Display picture upload failed."
|
|
case .uploadMaxFileSizeExceeded: return "Maximum file size exceeded."
|
|
case .invalidCall: return "Attempted to remove display picture using the wrong method."
|
|
case .invalidFilename: return "Filename would have resulted in an invalid path."
|
|
}
|
|
}
|
|
}
|