ErrorObject
class ErrorObject : NSError
Information about an error condition including a domain, a domain-specific error code, and application-specific information.
Objective-C methods can signal an error condition by returning an
NSError object by reference, which provides additional information
about the kind of error and any underlying cause, if one can be
determined. An NSError object may also provide localized error
descriptions suitable for display to the user in its user info
dictionary. See
Error Handling Programming Guide
for more information.
-
Returns an NSError object initialized for a given error type.
Declaration
Swift
required init(protocol: ErrorProtocol)Parameters
typeAn error object type.
commentThe comment to place above the key-value pair in the strings file.
Return Value
An
NSErrorobject initialized for domain with the specified error code and the dictionary of arbitrary data userInfo. -
Returns an NSError object initialized for a given code.
Declaration
Swift
required init(code: Int, value: String)Parameters
codeThe error code for the error.
valueThe value to return if key is nil or if a localized string for key can’t be found in the table.
commentThe comment to place above the key-value pair in the strings file.
Return Value
An
NSErrorobject initialized for domain with the specified error code and the dictionary of arbitrary data userInfo. -
Returns an object initialized from data in a given unarchiver.
Declaration
Swift
required init?(coder aDecoder: NSCoder)Parameters
aDecoderAn unarchiver object.
Return Value
self, initialized using the data in decoder.
ErrorObject Class Reference