mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Fixes logging non-AltServerErrors as AltServerError.underlyingError
This commit is contained in:
@@ -68,7 +68,12 @@ public class LoggedError: NSManagedObject, Fetchable
|
||||
self.date = date
|
||||
self._operation = operation?.rawValue
|
||||
|
||||
let nsError = error as NSError
|
||||
let nsError: NSError
|
||||
if let error = error as? ALTServerError, error.code == .underlyingError, let underlyingError = error.underlyingError {
|
||||
nsError = underlyingError as NSError
|
||||
} else {
|
||||
nsError = error as NSError
|
||||
}
|
||||
self.domain = nsError.domain
|
||||
self.code = Int32(nsError.code)
|
||||
self.userInfo = nsError.userInfo
|
||||
|
||||
Reference in New Issue
Block a user