try? changed to try with error handling

This commit is contained in:
Stuart Breckenridge
2021-09-21 09:22:45 +08:00
parent 78e0595708
commit c29afd2677
7 changed files with 106 additions and 86 deletions

View File

@@ -63,7 +63,7 @@ extension AppDelegate : AppDelegateAppleEvents {
do {
try ArticleThemeDownloader.shared.handleFile(at: location)
} catch {
NotificationCenter.default.post(name: .didEndDownloadingThemeWithError, object: nil, userInfo: ["error": error])
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
}
}
task.resume()