NSError code错误列表信息
官网地址:
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/Reference/reference.html
?
?
?
NSError?codes in the Cocoa error domain.
Constants
NSFileNoSuchFileErrorFile-system operation attempted on non-existent file
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileLockingErrorFailure to get a lock on file
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadUnknownErrorRead error, reason unknown
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadNoPermissionErrorRead error because of a permission problem
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadInvalidFileNameErrorRead error because of an invalid file name
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadCorruptFileErrorRead error because of a corrupted file, bad format, or similar reason
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadNoSuchFileErrorRead error because no such file was found
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadInapplicableStringEncodingErrorRead error because the string encoding was not applicable.
Access the bad encoding from the?userInfo?dictionary using the?NSStringEncodingErrorKey?key.
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadUnsupportedSchemeErrorRead error because the specified URL scheme is unsupported
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileReadTooLargeErrorRead error because the specified file was too large.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSFileReadUnknownStringEncodingErrorRead error because the string coding of the file could not be determined
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSFileWriteUnknownErrorWrite error, reason unknown
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileWriteNoPermissionErrorWrite error because of a permission problem
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileWriteInvalidFileNameErrorWrite error because of an invalid file name
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileWriteInapplicableStringEncodingErrorWrite error because the string encoding was not applicable.
Access the bad encoding from the?userInfo?dictionary using the?NSStringEncodingErrorKey?key.
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileWriteUnsupportedSchemeErrorWrite error because the specified URL scheme is unsupported
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileWriteOutOfSpaceErrorWrite error because of a lack of disk space
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileWriteVolumeReadOnlyErrorWrite error because because the volume is read only.
Available in Mac OS X v10.6 and later.
Declared in?FoundationErrors.h.
NSKeyValueValidationErrorKey-value coding validation error
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFormattingErrorFormatting error (related to display of data)
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSUserCancelledErrorThe user cancelled the operation (for example, by pressing Command-period).
This code is for errors that do not require a dialog displayed and might be candidates for special-casing.
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileErrorMinimumMarks the start of the range of error codes reserved for file errors
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFileErrorMaximumMarks the end of the range of error codes reserved for file errors
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSValidationErrorMinimumMarks the start of the range of error codes reserved for validation errors.
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSValidationErrorMaximumMarks the start and end of the range of error codes reserved for validation errors.
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFormattingErrorMinimumMarks the start of the range of error codes reserved for formatting errors.
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSFormattingErrorMaximumMarks end of the range of error codes reserved for formatting errors.
Available in Mac OS X v10.4 and later.
Declared in?FoundationErrors.h.
NSPropertyListReadCorruptErrorAn error was encountered while parsing the property list.
Available in Mac OS X v10.6 and later.
Declared in?FoundationErrors.h.
NSPropertyListReadUnknownVersionErrorThe version number of the property list is unable to be determined.
Available in Mac OS X v10.6 and later.
Declared in?FoundationErrors.h.
NSPropertyListReadStreamErrorAn stream error was encountered while reading the property list.
Available in Mac OS X v10.6 and later.
Declared in?FoundationErrors.h.
NSPropertyListWriteStreamErrorAn stream error was encountered while writing the property list.
Available in Mac OS X v10.6 and later.
Declared in?FoundationErrors.h.
NSPropertyListErrorMinimumMarks beginning of the range of error codes reserved for property list errors.
Available in Mac OS X v10.6 and later.
Declared in?FoundationErrors.h.
NSPropertyListErrorMaximumMarks end of the range of error codes reserved for property list errors.
Available in Mac OS X v10.6 and later.
Declared in?FoundationErrors.h.
NSExecutableErrorMinimumMarks beginning of the range of error codes reserved for errors related to executable files.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSExecutableNotLoadableErrorExecutable is of a type that is not loadable in the current process.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSExecutableArchitectureMismatchErrorExecutable does not provide an architecture compatible with the current process.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSExecutableRuntimeMismatchErrorExecutable has Objective C runtime information incompatible with the current process.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSExecutableLoadErrorExecutable cannot be loaded for some other reason, such as a problem with a library it depends on.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSExecutableLinkErrorExecutable fails due to linking issues.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
NSExecutableErrorMaximumMarks end of the range of error codes reserved for errors related to executable files.
Available in Mac OS X v10.5 and later.
Declared in?FoundationErrors.h.
These values are returned as the error code property of an?NSError?object with the domain “NSURLErrorDomain”.
Constants
NSURLErrorUnknownReturned when the URL Loading system encounters an error that it cannot interpret.
This can occur when an error originates from a lower level framework or library. Whenever this error code is received, it is a bug, and should be reported to Apple.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCancelledReturned when an asynchronous load is canceled.
A Web Kit framework delegate will receive this error when it performs a cancel operation on a loading resource. Note that an?NSURLConnection?or?NSURLDownload?delegate will not receive this error if the download is canceled.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorBadURLReturned when a URL is sufficiently malformed that a URL request cannot be initiated
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorTimedOutReturned when an asynchronous operation times out.
NSURLConnection?will send this error to its delegate when the timeoutInterval in NSURLRequest expires before a load can complete.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorUnsupportedURLReturned when a properly formed URL cannot be handled by the framework.
The most likely cause is that there is no available protocol handler for the URL.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotFindHostReturned when the host name for a URL cannot be resolved.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotConnectToHostReturned when an attempt to connect to a host has failed.
This can occur when a host name resolves, but the host is down or may not be accepting connections on a certain port.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorDataLengthExceedsMaximumReturned when the length of the resource data exceeds the maximum allowed.
Available in Mac OS X v10.5 and later.
Declared in?NSURLError.h.
NSURLErrorNetworkConnectionLostReturned when a client or server connection is severed in the middle of an in-progress load.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorDNSLookupFailedSee?NSURLErrorCannotFindHost
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorHTTPTooManyRedirectsReturned when a redirect loop is detected or when the threshold for number of allowable redirects has been exceeded (currently 16).
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorResourceUnavailableReturned when a requested resource cannot be retrieved.
Examples are “file not found”, and data decoding problems that prevent data from being processed correctly.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorNotConnectedToInternetReturned when a network resource was requested, but an internet connection is not established and cannot be established automatically, either through a lack of connectivity, or by the user's choice not to make a network connection automatically.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorRedirectToNonExistentLocationReturned when a redirect is specified by way of server response code, but the server does not accompany this code with a redirect URL.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorBadServerResponseReturned when the URL Loading system receives bad data from the server.
This is equivalent to the “500 Server Error” message sent by HTTP servers.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorUserCancelledAuthenticationReturned when an asynchronous request for authentication is cancelled by the user.
This is typically incurred by clicking a “Cancel” button in a username/password dialog, rather than the user making an attempt to authenticate.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorUserAuthenticationRequiredReturned when authentication is required to access a resource.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorZeroByteResourceReturned when a server reports that a URL has a non-zero content length, but terminates the network connection “gracefully” without sending any data.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotDecodeRawDataReturned when content data received during an NSURLConnection request cannot be decoded for a known content encoding.
Available in Mac OS X v10.5 and later.
Declared in?NSURLError.h.
NSURLErrorCannotDecodeContentDataReturned when content data received during an NSURLConnection request has an unknown content encoding.
Available in Mac OS X v10.5 and later.
Declared in?NSURLError.h.
NSURLErrorCannotParseResponseReturned when a response to an NSURLConnection request cannot be parsed.
Available in Mac OS X v10.5 and later.
Declared in?NSURLError.h.
NSURLErrorFileDoesNotExistReturned when a file does not exist.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorFileIsDirectoryReturned when a request for an FTP file results in the server responding that the file is not a plain file, but a directory.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorNoPermissionsToReadFileReturned when a resource cannot be read due to insufficient permissions.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorSecureConnectionFailedReturned when an attempt to establish a secure connection fails for reasons which cannot be expressed more specifically.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorServerCertificateHasBadDateReturned when a server certificate has a date which indicates it has expired, or is not yet valid.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorServerCertificateUntrustedReturned when a server certificate is signed by a root server which is not trusted.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorServerCertificateHasUnknownRootReturned when a server certificate is not signed by any root server.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorServerCertificateNotYetValidReturned when a server certificate is not yet valid.
Available in Mac OS X v10.4 and later.
Declared in?NSURLError.h.
NSURLErrorClientCertificateRejectedReturned when a server certificate is rejected.
Available in Mac OS X v10.4 and later.
Declared in?NSURLError.h.
NSURLErrorClientCertificateRequiredReturned when a client certificate is required to authenticate an SSL connection during an NSURLConnection request.
Available in Mac OS X v10.6 and later.
Declared in?NSURLError.h.
NSURLErrorCannotLoadFromNetworkReturned when a specific request to load an item only from the cache cannot be satisfied.
This error is sent at the point when the library would go to the network accept for the fact that is has been blocked from doing so by the “load only from cache” directive.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotCreateFileReturned when?NSURLDownload?object was unable to create the downloaded file on disk due to a I/O failure.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotOpenFileReturned when?NSURLDownload?was unable to open the downloaded file on disk.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotCloseFileReturned when?NSURLDownload?was unable to close the downloaded file on disk.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotWriteToFileReturned when?NSURLDownload?was unable to write to the downloaded file on disk.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotRemoveFileReturned when?NSURLDownload?was unable to remove a downloaded file from disk.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorCannotMoveFileReturned when?NSURLDownload?was unable to move a downloaded file on disk.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorDownloadDecodingFailedMidStreamReturned when?NSURLDownload?failed to decode an encoded file during the download.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.
NSURLErrorDownloadDecodingFailedToCompleteReturned when?NSURLDownload?failed to decode an encoded file after downloading.
Available in Mac OS X v10.2 and later.
Declared in?NSURLError.h.