NSError Codes

NSError codes in the Cocoa error domain.

Overview

The constants in this enumeration are NSError code numbers in the Cocoa error domain (NSCocoaErrorDomain). Other frameworks, most notably the Application Kit, provide their own NSCocoaErrorDomain error codes.

The enumeration constants beginning with NSFile indicate file-system errors or errors related to file I/O operations. Use the key NSFilePathErrorKey or the NSURLErrorKey (whichever is appropriate) to access the file-system path or URL in the userInfo dictionary of the NSError object.

Symbols

Constants

var NSFileNoSuchFileError: Int

File-system operation attempted on non-existent file

var NSFileLockingError: Int

Failure to get a lock on file

var NSFileReadUnknownError: Int

Read error, reason unknown

var NSFileReadNoPermissionError: Int

Read error because of a permission problem

var NSFileReadInvalidFileNameError: Int

Read error because of an invalid file name

var NSFileReadCorruptFileError: Int

Read error because of a corrupted file, bad format, or similar reason

var NSFileReadNoSuchFileError: Int

Read error because no such file was found

var NSFileReadInapplicableStringEncodingError: Int

Read error because the string encoding was not applicable.

var NSFileReadUnsupportedSchemeError: Int

Read error because the specified URL scheme is unsupported

var NSFileReadTooLargeError: Int

Read error because the specified file was too large.

var NSFileReadUnknownStringEncodingError: Int

Read error because the string coding of the file could not be determined

var NSFileWriteUnknownError: Int

Write error, reason unknown

var NSFileWriteNoPermissionError: Int

Write error because of a permission problem

var NSFileWriteInvalidFileNameError: Int

Write error because of an invalid file name

var NSFileWriteFileExistsError: Int

Write error returned when NSFileManager class’s copy, move, and link methods report errors when the destination file already exists.

var NSFileWriteInapplicableStringEncodingError: Int

Write error because the string encoding was not applicable.

var NSFileWriteUnsupportedSchemeError: Int

Write error because the specified URL scheme is unsupported

var NSFileWriteOutOfSpaceError: Int

Write error because of a lack of disk space

var NSFileWriteVolumeReadOnlyError: Int

Write error because because the volume is read only.

var NSKeyValueValidationError: Int

Key-value coding validation error

var NSFormattingError: Int

Formatting error (related to display of data)

var NSUserCancelledError: Int

The user cancelled the operation (for example, by pressing Command-period).

var NSFeatureUnsupportedError: Int

The feature is not supported, either because the file system lacks the feature, or required libraries are missing, or other similar reasons.

var NSFileErrorMinimum: Int

Marks the start of the range of error codes reserved for file errors

var NSFileErrorMaximum: Int

Marks the end of the range of error codes reserved for file errors

var NSValidationErrorMinimum: Int

Marks the start of the range of error codes reserved for validation errors.

var NSValidationErrorMaximum: Int

Marks the start and end of the range of error codes reserved for validation errors.

var NSFormattingErrorMinimum: Int

Marks the start of the range of error codes reserved for formatting errors.

var NSFormattingErrorMaximum: Int

Marks end of the range of error codes reserved for formatting errors.

var NSPropertyListReadCorruptError: Int

An error was encountered while parsing the property list.

var NSPropertyListReadUnknownVersionError: Int

The version number of the property list is unable to be determined.

var NSPropertyListReadStreamError: Int

An stream error was encountered while reading the property list.

var NSPropertyListWriteStreamError: Int

An stream error was encountered while writing the property list.

var NSPropertyListErrorMinimum: Int

Marks beginning of the range of error codes reserved for property list errors.

var NSPropertyListErrorMaximum: Int

Marks end of the range of error codes reserved for property list errors.

var NSExecutableErrorMinimum: Int

Marks beginning of the range of error codes reserved for errors related to executable files.

var NSExecutableNotLoadableError: Int

Executable is of a type that is not loadable in the current process.

var NSExecutableArchitectureMismatchError: Int

Executable does not provide an architecture compatible with the current process.

var NSExecutableRuntimeMismatchError: Int

Executable has Objective C runtime information incompatible with the current process.

var NSExecutableLoadError: Int

Executable cannot be loaded for some other reason, such as a problem with a library it depends on.

var NSExecutableLinkError: Int

Executable fails due to linking issues.

var NSExecutableErrorMaximum: Int

Marks end of the range of error codes reserved for errors related to executable files.

var NSBundleErrorMaximum: Intvar NSBundleErrorMinimum: Intvar NSBundleOnDemandResourceExceededMaximumSizeError: Intvar NSBundleOnDemandResourceInvalidTagError: Intvar NSBundleOnDemandResourceOutOfSpaceError: Intvar NSCloudSharingConflictError: Intvar NSCloudSharingErrorMaximum: Intvar NSCloudSharingErrorMinimum: Intvar NSCloudSharingNetworkFailureError: Intvar NSCloudSharingNoPermissionError: Intvar NSCloudSharingOtherError: Intvar NSCloudSharingQuotaExceededError: Intvar NSCloudSharingTooManyParticipantsError: Intvar NSCoderErrorMaximum: Intvar NSCoderErrorMinimum: Intvar NSCoderReadCorruptError: Intvar NSCoderValueNotFoundError: Intvar NSFileManagerUnmountBusyError: Intvar NSFileManagerUnmountUnknownError: Intvar NSPropertyListWriteInvalidError: Int
var NSUbiquitousFileErrorMaximum: Int

The maximum error code value that represents an iCloud error.

var NSUbiquitousFileErrorMinimum: Int

The minimum error code value that represents an iCloud error.

var NSUbiquitousFileNotUploadedDueToQuotaError: Int

The item could not be uploaded to iCloud because it would make the account go over its quota.

var NSUbiquitousFileUbiquityServerNotAvailable: Int

Connecting to the iCloud servers failed.

var NSUbiquitousFileUnavailableError: Int

The item has not been uploaded to iCloud by another device yet.

var NSUserActivityConnectionUnavailableError: Intvar NSUserActivityErrorMaximum: Intvar NSUserActivityErrorMinimum: Intvar NSUserActivityHandoffFailedError: Intvar NSUserActivityHandoffUserInfoTooLargeError: Intvar NSUserActivityRemoteApplicationTimedOutError: Int
var NSXPCConnectionErrorMaximum: Int

The upper bounds of XPC connection error code values. All XPC error codes have values between NSXPCConnectionErrorMinimum and NSXPCConnectionErrorMaximum, exclusive. This constant does not correspond to any particular error.

var NSXPCConnectionErrorMinimum: Int

The lower bounds of XPC connection error code values. All XPC error codes have values between NSXPCConnectionErrorMinimum and NSXPCConnectionErrorMaximum, exclusive. This constant does not correspond to any particular error.

var NSXPCConnectionInterrupted: Int

The XPC connection was interrupted.

var NSXPCConnectionInvalid: Int

The XPC connection was invalid.

var NSXPCConnectionReplyInvalid: Int

The XPC connection reply was invalid.