From 4435485c1cb6c0b01362d9da253795f8ff5742b4 Mon Sep 17 00:00:00 2001 From: Jeremy Massel Date: Wed, 25 Mar 2020 16:29:20 -0600 Subject: [PATCH] Rename UploadError to EventLoggingFileUploadError --- .../Event Logging/EventLoggingUploadManager.swift | 2 +- Automattic-Tracks-iOS/Model/UploadError.swift | 2 +- Automattic-Tracks-iOS/Services/EventLoggingNetworkService.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Automattic-Tracks-iOS/Event Logging/EventLoggingUploadManager.swift b/Automattic-Tracks-iOS/Event Logging/EventLoggingUploadManager.swift index 02f54f1e..2eadcbe1 100644 --- a/Automattic-Tracks-iOS/Event Logging/EventLoggingUploadManager.swift +++ b/Automattic-Tracks-iOS/Event Logging/EventLoggingUploadManager.swift @@ -27,7 +27,7 @@ class EventLoggingUploadManager { } guard let fileContents = FileManager.default.contents(atUrl: log.url) else { - delegate.uploadFailed(withError: UploadError.fileMissing, forLog: log) + delegate.uploadFailed(withError: EventLoggingFileUploadError.fileMissing, forLog: log) return } diff --git a/Automattic-Tracks-iOS/Model/UploadError.swift b/Automattic-Tracks-iOS/Model/UploadError.swift index 545ed4f1..a0a3044b 100644 --- a/Automattic-Tracks-iOS/Model/UploadError.swift +++ b/Automattic-Tracks-iOS/Model/UploadError.swift @@ -1,6 +1,6 @@ import Foundation -public enum UploadError: Error, LocalizedError { +public enum EventLoggingFileUploadError: Error, LocalizedError { case httpError(String) case fileMissing diff --git a/Automattic-Tracks-iOS/Services/EventLoggingNetworkService.swift b/Automattic-Tracks-iOS/Services/EventLoggingNetworkService.swift index 572f7362..1b2a4c0d 100644 --- a/Automattic-Tracks-iOS/Services/EventLoggingNetworkService.swift +++ b/Automattic-Tracks-iOS/Services/EventLoggingNetworkService.swift @@ -24,7 +24,7 @@ open class EventLoggingNetworkService { /// Generate a reasonable error message based on the HTTP status if !(200 ... 299).contains(statusCode) { let errorMessage = HTTPURLResponse.localizedString(forStatusCode: statusCode) - completion(.failure(UploadError.httpError(errorMessage))) + completion(.failure(EventLoggingFileUploadError.httpError(errorMessage))) return }