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

@@ -152,7 +152,7 @@ final class LaunchViewController: RSTLaunchViewController, UIDocumentPickerDeleg
try start(pairing_file, documentsDirectory)
} catch {
try! FileManager.default.removeItem(at: FileManager.default.documentsDirectory.appendingPathComponent("\(pairingFileName)"))
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())")
}
set_debug(UserDefaults.shared.isDebugLoggingEnabled)
start_auto_mounter(documentsDirectory)