mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-13 00:33:28 +01:00
[AltServer] Improves ALTServerErrorIncompatibleDeveloperDisk error message
Uses NSError’s debug description, if available, to populate error alerts.
This commit is contained in:
@@ -319,7 +319,12 @@ private extension AppDelegate
|
||||
|
||||
if let errorFailure = nsError.localizedFailure
|
||||
{
|
||||
if let failureReason = nsError.localizedFailureReason
|
||||
if let debugDescription = nsError.localizedDebugDescription
|
||||
{
|
||||
alert.messageText = errorFailure
|
||||
messageComponents.append(debugDescription)
|
||||
}
|
||||
else if let failureReason = nsError.localizedFailureReason
|
||||
{
|
||||
if nsError.localizedDescription.starts(with: errorFailure)
|
||||
{
|
||||
@@ -352,7 +357,15 @@ private extension AppDelegate
|
||||
else
|
||||
{
|
||||
alert.messageText = localizedFailure
|
||||
messageComponents.append(nsError.localizedDescription)
|
||||
|
||||
if let debugDescription = nsError.localizedDebugDescription
|
||||
{
|
||||
messageComponents.append(debugDescription)
|
||||
}
|
||||
else
|
||||
{
|
||||
messageComponents.append(nsError.localizedDescription)
|
||||
}
|
||||
}
|
||||
|
||||
if let recoverySuggestion = nsError.localizedRecoverySuggestion
|
||||
|
||||
@@ -1219,6 +1219,7 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
|
||||
// Connection failed with .unknown error code, so we assume the developer disk is NOT compatible.
|
||||
NSMutableDictionary *userInfo = [@{
|
||||
ALTOperatingSystemVersionErrorKey: NSStringFromOperatingSystemVersion(altDevice.osVersion),
|
||||
NSFilePathErrorKey: diskURL.path,
|
||||
NSUnderlyingErrorKey: error,
|
||||
} mutableCopy];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user