refactor: Reduce duplicate code with Error.message()

also add some things I forgot in previous commits
This commit is contained in:
naturecodevoid
2023-06-01 07:36:40 -07:00
parent 175b5bec95
commit 7bb1c1cf05
6 changed files with 21 additions and 14 deletions

View File

@@ -88,7 +88,7 @@ struct AsyncFallibleButton<Label: View>: View {
} catch {
DispatchQueue.main.async {
state = .error
errorAlertMessage = (error as? LocalizedError)?.failureReason ?? error.localizedDescription
errorAlertMessage = error.message()
showErrorAlert = true
}
}

View File

@@ -315,7 +315,7 @@ extension OnboardingView {
try! FileManager.default.removeItem(at: FileManager.default.documentsDirectory.appendingPathComponent("\(pairingFileName)"))
NotificationManager.shared.reportError(error: error)
debugPrint("minimuxer failed to start, please restart SideStore.", error)
// displayError("minimuxer failed to start, please restart SideStore. \((error as? LocalizedError)?.failureReason ?? "UNKNOWN ERROR!!!!!! REPORT TO GITHUB ISSUES!")")
// displayError("minimuxer failed to start, please restart SideStore. \(error.message())")
}
start_auto_mounter(documentsDirectory)
}