年年有"余"

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 3306|回复: 0

[项目经验] NSError 错误code对照

[复制链接]
  • TA的每日心情

    2024-10-15 10:05
  • 签到天数: 372 天

    [LV.9]以坛为家II

    发表于 2015-10-28 13:12:39 | 显示全部楼层 |阅读模式

    NSError codes in the Cocoa error domain.

    enum {
       NSFileNoSuchFileError = 4,
       NSFileLockingError = 255,
       NSFileReadUnknownError = 256,
       NSFileReadNoPermissionError = 257,
       NSFileReadInvalidFileNameError = 258,
       NSFileReadCorruptFileError = 259,
       NSFileReadNoSuchFileError = 260,
       NSFileReadInapplicableStringEncodingError = 261,
       NSFileReadUnsupportedSchemeError = 262,
       NSFileReadTooLargeError = 263,
       NSFileReadUnknownStringEncodingError = 264,
       NSFileWriteUnknownError = 512,
       NSFileWriteNoPermissionError = 513,
       NSFileWriteInvalidFileNameError = 514,
       NSFileWriteInapplicableStringEncodingError = 517,
       NSFileWriteUnsupportedSchemeError = 518,
       NSFileWriteOutOfSpaceError = 640,
       NSFileWriteVolumeReadOnlyError = 642m
       NSKeyValueValidationError = 1024,
       NSFormattingError = 2048,
       NSUserCancelledError = 3072,
       
       NSFileErrorMinimum = 0,
       NSFileErrorMaximum = 1023,
       NSValidationErrorMinimum = 1024,
       NSValidationErrorMaximum = 2047,
       NSFormattingErrorMinimum = 2048,
       NSFormattingErrorMaximum = 2559,
       
       NSPropertyListReadCorruptError = 3840,
       NSPropertyListReadUnknownVersionError = 3841,
       NSPropertyListReadStreamError = 3842,
       NSPropertyListWriteStreamError = 3851,
       NSPropertyListErrorMinimum = 3840,
       NSPropertyListErrorMaximum = 4095
       
       NSExecutableErrorMinimum = 3584,
       NSExecutableNotLoadableError = 3584,
       NSExecutableArchitectureMismatchError = 3585,
       NSExecutableRuntimeMismatchError = 3586,
       NSExecutableLoadError = 3587,
       NSExecutableLinkError = 3588,
       NSExecutableErrorMaximum = 3839,
       
    }
    URL Loading System Error Codes

    These values are returned as the error code property of an NSError object with the domain “NSURLErrorDomain”.

    typedef enum
    {
       NSURLErrorUnknown = -1,
       NSURLErrorCancelled = -999,
       NSURLErrorBadURL = -1000,
       NSURLErrorTimedOut = -1001,
       NSURLErrorUnsupportedURL = -1002,
       NSURLErrorCannotFindHost = -1003,
       NSURLErrorCannotConnectToHost = -1004,
       NSURLErrorDataLengthExceedsMaximum = -1103,
       NSURLErrorNetworkConnectionLost = -1005,
       NSURLErrorDNSLookupFailed = -1006,
       NSURLErrorHTTPTooManyRedirects = -1007,
       NSURLErrorResourceUnavailable = -1008,
       NSURLErrorNotConnectedToInternet = -1009,
       NSURLErrorRedirectToNonExistentLocation = -1010,
       NSURLErrorBadServerResponse = -1011,
       NSURLErrorUserCancelledAuthentication = -1012,
       NSURLErrorUserAuthenticationRequired = -1013,
       NSURLErrorZeroByteResource = -1014,
       NSURLErrorCannotDecodeRawData = -1015,
       NSURLErrorCannotDecodeContentData = -1016,
       NSURLErrorCannotParseResponse = -1017,
       NSURLErrorFileDoesNotExist = -1100,
       NSURLErrorFileIsDirectory = -1101,
       NSURLErrorNoPermissionsToReadFile = -1102,
       NSURLErrorSecureConnectionFailed = -1200,
       NSURLErrorServerCertificateHasBadDate = -1201,
       NSURLErrorServerCertificateUntrusted = -1202,
       NSURLErrorServerCertificateHasUnknownRoot = -1203,
       NSURLErrorServerCertificateNotYetValid = -1204,
       NSURLErrorClientCertificateRejected = -1205,
       NSURLErrorClientCertificateRequired = -1206,
       NSURLErrorCannotLoadFromNetwork = -2000,
       NSURLErrorCannotCreateFile = -3000,
       NSURLErrorCannotOpenFile = -3001,
       NSURLErrorCannotCloseFile = -3002,
       NSURLErrorCannotWriteToFile = -3003,
       NSURLErrorCannotRemoveFile = -3004,
       NSURLErrorCannotMoveFile = -3005,
       NSURLErrorDownloadDecodingFailedMidStream = -3006,
       NSURLErrorDownloadDecodingFailedToComplete = -3007
    }
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    手机版|小黑屋|Archiver|iOS开发笔记 ( 湘ICP备14010846号 )

    GMT+8, 2024-12-23 17:25 , Processed in 0.047044 second(s), 22 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表