mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
19 lines
493 B
Swift
19 lines
493 B
Swift
//
|
|
// NSError+LocalizedFailure.swift
|
|
// AltStore
|
|
//
|
|
// Created by Riley Testut on 3/11/20.
|
|
// Copyright © 2020 Riley Testut. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension NSError
|
|
{
|
|
@objc(alt_localizedFailure)
|
|
var localizedFailure: String? {
|
|
let localizedFailure = (self.userInfo[NSLocalizedFailureErrorKey] as? String) ?? (NSError.userInfoValueProvider(forDomain: self.domain)?(self, NSLocalizedFailureErrorKey) as? String)
|
|
return localizedFailure
|
|
}
|
|
}
|