美文网首页
oc NSError错误码

oc NSError错误码

作者: 半夏半暖半倾城灬 | 来源:发表于2018-05-30 10:26 被阅读0次

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 (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

}

相关文章

  • oc NSError错误码

    NSErrorcodes in the Cocoa error domain enum { NSFileNoSu...

  • NSError - 错误

    简单记录下,没什么内容;NSError 内容也比较简单:错误域,错误码,错误信息 遇到很多把 domain 当做 ...

  • Swift创建Error对象

    Error 在OC中,经常使用的NSError是一个类,使用其自带的类方法可以很方便地构造出一个NSError对象...

  • iOS中NSError的使用

      NSError 来对错误信息进行封装,它主要由3部分内容组成: domain 错误发生域 code 错误码 u...

  • iOS的try catch是与非

    先来个概述: OC中得异常处理符号和C++、JAVA相似。再加上使用NSException,NSError或者自定...

  • AFNetworking-NSError错误码,中文提示

    NSError 中文提示 使用AFNetworking 网络请求失败,返回NSError对象,通常去error.l...

  • Effective-OC2.0之OC命名、NSerror、NSC

    在一个类里面定义对象时,尽量定义属性为不可变的。如果需要用到不可变的属性,尽量不把它公开,定义为实例变量,然后提供...

  • 为什么传递NSError需要指针的指针

    在编写Objective-C代码时,很多时候会需要对错误进行处理,在OC里使用的是NSError。当我们编写一个方...

  • NSError对照码

    前言整理一下在iOS开发中NSError的错误代码 NSError NSError是系统错误信息类 初始化方法两个...

  • AFNetworking解析错误信息

    如果请求失败则NSError不为空这时候可以解析NSError来获得失败信息

网友评论

      本文标题:oc NSError错误码

      本文链接:https://www.haomeiwen.com/subject/cfltsftx.html