mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 19:23:43 +01:00
Fixes logging non-ALTServerErrors errors as ALTServerError.underlyingError
This commit is contained in:
@@ -67,7 +67,16 @@ public class LoggedError: NSManagedObject, Fetchable
|
|||||||
self.date = date
|
self.date = date
|
||||||
self._operation = operation?.rawValue
|
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.domain = nsError.domain
|
||||||
self.code = Int32(nsError.code)
|
self.code = Int32(nsError.code)
|
||||||
self.userInfo = nsError.userInfo
|
self.userInfo = nsError.userInfo
|
||||||
|
|||||||
Reference in New Issue
Block a user