File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed
Sources/SystemExtensionKit Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import Foundation
99import SystemExtensions
1010
1111public extension SystemExtensionKit {
12- enum ExtensionError : Error {
12+ enum ExtensionError : LocalizedError {
1313 case extensionDirectoryFailed( String , Error )
1414 case extensionNotExist
1515 case extensionCreateURLFailed( String )
@@ -18,7 +18,7 @@ public extension SystemExtensionKit {
1818 case extensionNeedReboot
1919 case extensionSystemUnsupport
2020
21- var localizedDescription : String {
21+ public var errorDescription : String ? {
2222 switch self {
2323 case . extensionDirectoryFailed( let urlStr, let error) :
2424 return " Failed to get the contents of \( urlStr) : \( error. localizedDescription) "
@@ -158,14 +158,3 @@ extension OSSystemExtensionError.Code: CustomStringConvertible {
158158 }
159159 }
160160}
161-
162- // MARK: - Error Convinience
163-
164- public extension Error {
165- var systemExtensionDescription : String {
166- guard let error = self as? SystemExtensionKit . ExtensionError else {
167- return localizedDescription
168- }
169- return error. localizedDescription
170- }
171- }
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ import SystemExtensions
1212#error("SystemExtensionKit doesn't support Swift versions below 5.5.")
1313#endif
1414
15- /// Current SystemExtensionKit version 2.0.6 . Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16- public let version = " 2.0.6 "
15+ /// Current SystemExtensionKit version 2.0.7 . Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16+ public let version = " 2.0.7 "
1717
1818public let SystemExtension = SystemExtensionKit . shared
1919
You can’t perform that action at this time.
0 commit comments