Change to not show alert dialog on automatic refreshes. Issue #729
This commit is contained in:
parent
c30c7d6f8d
commit
e8199ed0a6
|
@ -8,11 +8,18 @@
|
|||
|
||||
import AppKit
|
||||
import Account
|
||||
import os.log
|
||||
|
||||
struct ErrorHandler {
|
||||
|
||||
private static var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "Account")
|
||||
|
||||
public static func present(_ error: Error) {
|
||||
NSApplication.shared.presentError(error)
|
||||
}
|
||||
|
||||
public static func log(_ error: Error) {
|
||||
os_log(.error, log: self.log, "%@", error.localizedDescription)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ class AccountRefreshTimer {
|
|||
lastTimedRefresh = Date()
|
||||
update()
|
||||
|
||||
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.present)
|
||||
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue