Permalink
Browse files

SKError still is not a real Error, hard-code these

Not ideal, but there’s also no harm in it.
  • Loading branch information...
mxcl committed Oct 2, 2018
1 parent 4142285 commit 4ff9962082349a3dba84617e6e044ccda5cd41fd
Showing with 5 additions and 0 deletions.
  1. +5 −0 Sources/Error.swift
View
@@ -83,7 +83,12 @@ extension Error {
} catch CocoaError.userCancelled {
return true
} catch {
#if os(macOS) || os(iOS) || os(tvOS)
let pair = { ($0.domain, $0.code) }(error as NSError)
return ("SKErrorDomain", 2) == pair
#else
return false
#endif
}
}
}

0 comments on commit 4ff9962

Please sign in to comment.