One Logo Pool Ball
Foundation · IOS API REFERENCE

NSError

class · SDK 27.1

class NSError

Members (15)

static · iOS 2.0+ · Deprecated in iOS 27.0

new

TypeScript
static new(): NSError
Swift declaration
class func new() -> Self
static · iOS 9.0+

setUserInfoValueProvider

TypeScript
static setUserInfoValueProvider(errorDomain: string): void
Swift declaration
class func setUserInfoValueProvider(forDomain errorDomain: String, provider: (@Sendable (any Error, String) -> Any?)? = nil)
static · iOS 9.0+

userInfoValueProvider

TypeScript
static userInfoValueProvider(errorDomain: string): (((arg0: NativeError, arg1: string) => Promise<(unknown) | null>)) | null
Swift declaration
class func userInfoValueProvider(forDomain errorDomain: String) -> (@Sendable (any Error, String) -> Any?)?
init · iOS 2.0+ · Deprecated in iOS 27.0

init

TypeScript
static init(): NSError
Swift declaration
convenience init()
init

init

TypeScript
static initDomainCodeUserInfo(domain: string, code: number, dict?: (Record<string, unknown>) | null): NSError
Swift declaration
init(domain: String, code: Int, userInfo dict: [String : Any]? = nil)
get

code

TypeScript
get code(): number
Swift declaration
var code: Int { get }
get

domain

TypeScript
get domain(): string
Swift declaration
var domain: String { get }
get

helpAnchor

TypeScript
get helpAnchor(): (string) | null
Swift declaration
var helpAnchor: String? { get }
get

localizedDescription

TypeScript
get localizedDescription(): string
Swift declaration
var localizedDescription: String { get }
get

localizedFailureReason

TypeScript
get localizedFailureReason(): (string) | null
Swift declaration
var localizedFailureReason: String? { get }
get

localizedRecoveryOptions

TypeScript
get localizedRecoveryOptions(): (Array<string>) | null
Swift declaration
var localizedRecoveryOptions: [String]? { get }
get

localizedRecoverySuggestion

TypeScript
get localizedRecoverySuggestion(): (string) | null
Swift declaration
var localizedRecoverySuggestion: String? { get }
get

recoveryAttempter

TypeScript
get recoveryAttempter(): (unknown) | null
Swift declaration
var recoveryAttempter: Any? { get }
get · iOS 14.5+

underlyingErrors

TypeScript
get underlyingErrors(): Array<NativeError>
Swift declaration
var underlyingErrors: [any Error] { get }
get

userInfo

TypeScript
get userInfo(): Record<string, unknown>
Swift declaration
var userInfo: [String : Any] { get }

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →