mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-17 18:53:40 +01:00
refresh-app: enhanced error logging when app extension validation check fails (#730)
refresh-app: enhanced error logging when app exenstion validation check fails
This commit is contained in:
@@ -1427,10 +1427,11 @@ private extension AppManager
|
|||||||
let dbAppExNames = dbAppEx.map{ $0.bundleIdentifier }
|
let dbAppExNames = dbAppEx.map{ $0.bundleIdentifier }
|
||||||
|
|
||||||
let isMatching = Set(dbAppExNames) == Set(diskAppExNames)
|
let isMatching = Set(dbAppExNames) == Set(diskAppExNames)
|
||||||
print("AppManager.refresh: App Extensions in DB and Disk are matching: \(isMatching)")
|
let errMessage = "AppManager.refresh: App Extensions in DB and Disk are matching: \(isMatching)\n"
|
||||||
print("AppManager.refresh: dbAppEx: \(dbAppExNames); diskAppEx: \(String(describing: diskAppExNames))")
|
+ "AppManager.refresh: dbAppEx: \(dbAppExNames); diskAppEx: \(String(describing: diskAppExNames))\n"
|
||||||
|
print(errMessage)
|
||||||
if(!isMatching){
|
if(!isMatching){
|
||||||
completionHandler(.failure(OperationError.invalidParameters))
|
completionHandler(.failure(OperationError.refreshAppFailed(message: errMessage)))
|
||||||
}
|
}
|
||||||
op.finish()
|
op.finish()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ extension OperationError
|
|||||||
case noSources
|
case noSources
|
||||||
case openAppFailed//(name: String)
|
case openAppFailed//(name: String)
|
||||||
case missingAppGroup
|
case missingAppGroup
|
||||||
|
case refreshAppFailed
|
||||||
|
|
||||||
// Connection
|
// Connection
|
||||||
case noWiFi = 1200
|
case noWiFi = 1200
|
||||||
@@ -107,6 +108,10 @@ extension OperationError
|
|||||||
OperationError(code: .anisetteV3Error, failureReason: message)
|
OperationError(code: .anisetteV3Error, failureReason: message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static func refreshAppFailed(message: String) -> OperationError {
|
||||||
|
OperationError(code: .refreshAppFailed, failureReason: message)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -176,6 +181,11 @@ struct OperationError: ALTLocalizedError {
|
|||||||
case .anisetteV3Error: return NSLocalizedString("An error occurred when getting anisette data from a V3 server: %@. Please try again. If the issue persists, report it on GitHub Issues!", comment: "")
|
case .anisetteV3Error: return NSLocalizedString("An error occurred when getting anisette data from a V3 server: %@. Please try again. If the issue persists, report it on GitHub Issues!", comment: "")
|
||||||
case .cacheClearError: return NSLocalizedString("An error occurred while clearing cache: %@", comment: "")
|
case .cacheClearError: return NSLocalizedString("An error occurred while clearing cache: %@", comment: "")
|
||||||
case .SideJITIssue: return NSLocalizedString("An error occurred while using SideJIT: %@", comment: "")
|
case .SideJITIssue: return NSLocalizedString("An error occurred while using SideJIT: %@", comment: "")
|
||||||
|
|
||||||
|
case .refreshAppFailed:
|
||||||
|
let message = self._failureReason ?? ""
|
||||||
|
return String(format: NSLocalizedString("Unable to refresh App\n%@", comment: ""), message)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user