|
|
|
@ -21,6 +21,33 @@ public enum StoreError: Error, LocalizedError { |
|
|
|
case castIssue(type: String) |
|
|
|
case castIssue(type: String) |
|
|
|
case invalidStoreLookup(from: any Storable.Type, to: any Storable.Type) |
|
|
|
case invalidStoreLookup(from: any Storable.Type, to: any Storable.Type) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public var localizedDescription: String { |
|
|
|
|
|
|
|
switch self { |
|
|
|
|
|
|
|
case .missingService: |
|
|
|
|
|
|
|
return "L'instance des services est nulle" |
|
|
|
|
|
|
|
case .missingUsername: |
|
|
|
|
|
|
|
return "Le nom d'utilisateur est manquant" |
|
|
|
|
|
|
|
case .missingUserId: |
|
|
|
|
|
|
|
return "L'identifiant utilisateur est manquant" |
|
|
|
|
|
|
|
case .missingToken: |
|
|
|
|
|
|
|
return "Aucun token n'est stocké" |
|
|
|
|
|
|
|
case .missingKeychainStore: |
|
|
|
|
|
|
|
return "Aucun magasin de trousseau n'est disponible" |
|
|
|
|
|
|
|
case .collectionNotRegistered(let type): |
|
|
|
|
|
|
|
return "La collection \(type) n'est pas enregistrée" |
|
|
|
|
|
|
|
case .apiCallCollectionNotRegistered(let type): |
|
|
|
|
|
|
|
return "La collection d'appels API n'a pas été enregistrée pour \(type)" |
|
|
|
|
|
|
|
case .synchronizationInactive: |
|
|
|
|
|
|
|
return "La synchronisation n'est pas active sur ce StoreCenter" |
|
|
|
|
|
|
|
case .storeNotRegistered(let id): |
|
|
|
|
|
|
|
return "Le magasin avec l'identifiant \(id) n'est pas enregistré" |
|
|
|
|
|
|
|
case .castIssue(let type): |
|
|
|
|
|
|
|
return "Problème de typage: \(type)" |
|
|
|
|
|
|
|
case .invalidStoreLookup(let from, let to): |
|
|
|
|
|
|
|
return "Mauvaise recherche dans le magasin de \(from) à \(to)" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public var errorDescription: String? { |
|
|
|
public var errorDescription: String? { |
|
|
|
switch self { |
|
|
|
switch self { |
|
|
|
case .missingService: |
|
|
|
case .missingService: |
|
|
|
|