热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

NSErrorcode错误列表信息

1.FoundationErrorNS_ENUM(NSInteger){*FilesystemandfileIOrelatederrors,withNSFilePathErrorK

1.FoundationError

NS_ENUM(NSInteger) {/* File system and file I/O related errors,
with NSFilePathErrorKey or NSURLErrorKey containing path or URL*/
NSFileNoSuchFileError = 4,
// Attempt to do a file system operation on a non-existent file
NSFileLockingError = 255,
// Couldn't get a lock on file
NSFileReadUnknownError = 256,
// Read error (reason unknown)
NSFileReadNoPermissiOnError= 257,
// Read error (permission problem)
NSFileReadInvalidFileNameError = 258,
// Read error (invalid file name)
NSFileReadCorruptFileError = 259,
// Read error (file corrupt, bad format, etc)
NSFileReadNoSuchFileError = 260,
// Read error (no such file)
NSFileReadInapplicableStringEncodingError = 261,
// Read error (string encoding not applicable) also NSStringEncodingErrorKey
NSFileReadUnsupportedSchemeError = 262,
// Read error (unsupported URL scheme)
NSFileReadTooLargeError NS_ENUM_AVAILABLE(10_5, 2_0) = 263,
// Read error (file too large)
NSFileReadUnknownStringEncodingError NS_ENUM_AVAILABLE(10_5, 2_0) = 264,
// Read error (string encoding of file contents could not be determined)
NSFileWriteUnknownError = 512,
// Write error (reason unknown)
NSFileWriteNoPermissiOnError= 513,
// Write error (permission problem)
NSFileWriteInvalidFileNameError = 514,
// Write error (invalid file name)
NSFileWriteFileExistsError NS_ENUM_AVAILABLE(10_7, 5_0) = 516,
// Write error (file exists)
NSFileWriteInapplicableStringEncodingError = 517,
// Write error (string encoding not applicable) also NSStringEncodingErrorKey
NSFileWriteUnsupportedSchemeError = 518,
// Write error (unsupported URL scheme)
NSFileWriteOutOfSpaceError = 640,
// Write error (out of disk space)
NSFileWriteVolumeReadOnlyError NS_ENUM_AVAILABLE(10_6, 4_0) = 642,
// Write error (readonly volume)
// NSFileManager unmount errors
NSFileManagerUnmountUnknownError NS_ENUM_AVAILABLE(10_11, NA) = 768,
// The volume could not be unmounted (reason unknown)
NSFileManagerUnmountBusyError NS_ENUM_AVAILABLE(10_11, NA) = 769,
// The volume could not be unmounted because it is in use
// Other errors
NSKeyValueValidatiOnError= 1024,
// KVC validation error
NSFormattingError = 2048,
// Formatting error
NSUserCancelledError = 3072,
// User cancelled operation (this one often doesn't deserve a panel and might be a good one to special case)
NSFeatureUnsupportedError NS_ENUM_AVAILABLE(10_8, 6_0) = 3328,
// Feature unsupported error
// Executable loading errors
NSExecutableNotLoadableError NS_ENUM_AVAILABLE(10_5, 2_0) = 3584,
// Executable is of a type that is not loadable in the current process
NSExecutableArchitectureMismatchError NS_ENUM_AVAILABLE(10_5, 2_0) = 3585,
// Executable does not provide an architecture compatible with the current process
NSExecutableRuntimeMismatchError NS_ENUM_AVAILABLE(10_5, 2_0) = 3586,
// Executable has Objective C runtime information incompatible with the current process
NSExecutableLoadError NS_ENUM_AVAILABLE(10_5, 2_0) = 3587,
// Executable cannot be loaded for some other reason, such as a problem with a library it depends on
NSExecutableLinkError NS_ENUM_AVAILABLE(10_5, 2_0) = 3588,
// Executable fails due to linking issues
// Inclusive error range definitions, for checking future error codes
NSFileErrorMinimum = 0,
NSFileErrorMaximum = 1023,
NSValidatiOnErrorMinimum= 1024,
NSValidatiOnErrorMaximum= 2047,
NSExecutableErrorMinimum NS_ENUM_AVAILABLE(10_5, 2_0) = 3584,
NSExecutableErrorMaximum NS_ENUM_AVAILABLE(10_5, 2_0) = 3839,
NSFormattingErrorMinimum = 2048,
NSFormattingErrorMaximum = 2559,
NSPropertyListReadCorruptError NS_ENUM_AVAILABLE(10_6, 4_0) = 3840,
// Error parsing a property list
NSPropertyListReadUnknownVersionError NS_ENUM_AVAILABLE(10_6, 4_0) = 3841,
// The version number in the property list is unknown
NSPropertyListReadStreamError NS_ENUM_AVAILABLE(10_6, 4_0) = 3842,
// Stream error reading a property list
NSPropertyListWriteStreamError NS_ENUM_AVAILABLE(10_6, 4_0) = 3851,
// Stream error writing a property list
NSPropertyListWriteInvalidError NS_ENUM_AVAILABLE(10_10, 8_0) = 3852,
// Invalid property list object or invalid property list type specified when writing
NSPropertyListErrorMinimum NS_ENUM_AVAILABLE(10_6, 4_0) = 3840,
NSPropertyListErrorMaximum NS_ENUM_AVAILABLE(10_6, 4_0) = 4095,
NSXPCConnectionInterrupted NS_ENUM_AVAILABLE(10_8, 6_0) = 4097,
NSXPCConnectionInvalid NS_ENUM_AVAILABLE(10_8, 6_0) = 4099,
NSXPCConnectionReplyInvalid NS_ENUM_AVAILABLE(10_8, 6_0) = 4101,
NSXPCConnectionErrorMinimum NS_ENUM_AVAILABLE(10_8, 6_0) = 4096,
NSXPCConnectionErrorMaximum NS_ENUM_AVAILABLE(10_8, 6_0) = 4224,
NSUbiquitousFileUnavailableError NS_ENUM_AVAILABLE(10_9, 7_0) = 4353,
// NSURLUbiquitousItemDownloadingErrorKey contains an error with this code when the item has not been uploaded to iCloud by the other devices yet
NSUbiquitousFileNotUploadedDueToQuotaError NS_ENUM_AVAILABLE(10_9, 7_0) = 4354,
// NSURLUbiquitousItemUploadingErrorKey contains an error with this code when the item has not been uploaded to iCloud because it would make the account go over-quota
NSUbiquitousFileUbiquityServerNotAvailable NS_ENUM_AVAILABLE(10_9, 7_0) = 4355,
// NSURLUbiquitousItemDownloadingErrorKey and NSURLUbiquitousItemUploadingErrorKey contain an error with this code when connecting to the iCloud servers failed
NSUbiquitousFileErrorMinimum NS_ENUM_AVAILABLE(10_9, 7_0) = 4352,
NSUbiquitousFileErrorMaximum NS_ENUM_AVAILABLE(10_9, 7_0) = 4607,
NSUserActivityHandoffFailedError NS_ENUM_AVAILABLE(10_10, 8_0) = 4608,
// The data for the user activity was not available (e.g. if the remote device became unavailable.)
NSUserActivityConnectionUnavailableError NS_ENUM_AVAILABLE(10_10, 8_0) = 4609,
// The user activity could not be continued because a required connection was not available
NSUserActivityRemoteApplicationTimedOutError NS_ENUM_AVAILABLE(10_10, 8_0) = 4610,
// The remote application failed to send data in time
NSUserActivityHandoffUserInfoTooLargeError NS_ENUM_AVAILABLE(10_10, 8_0) = 4611,
// The NSUserActivity userInfo dictionary was too large to receive
NSUserActivityErrorMinimum NS_ENUM_AVAILABLE(10_10, 8_0) = 4608,
NSUserActivityErrorMaximum NS_ENUM_AVAILABLE(10_10, 8_0) = 4863,
NSCoderReadCorruptError NS_ENUM_AVAILABLE(10_11, 9_0) = 4864,
// Error parsing data during decode
NSCoderValueNotFoundError NS_ENUM_AVAILABLE(10_11, 9_0) = 4865,
// Data requested was not found
NSCoderErrorMinimum NS_ENUM_AVAILABLE(10_11, 9_0) = 4864,
NSCoderErrorMaximum NS_ENUM_AVAILABLE(10_11, 9_0) = 4991,
NSBundleErrorMinimum NS_ENUM_AVAILABLE(10_11, 9_0) = 4992,
NSBundleErrorMaximum NS_ENUM_AVAILABLE(10_11, 9_0) = 5119,
NSBundleOnDemandResourceOutOfSpaceError NS_ENUM_AVAILABLE(NA, 9_0) = 4992,
// There was not enough space available to download the requested On Demand Resources.
NSBundleOnDemandResourceExceededMaximumSizeError NS_ENUM_AVAILABLE(NA, 9_0) = 4993,
// The application exceeded the amount of On Demand Resources content in use at one time
NSBundleOnDemandResourceInvalidTagError NS_ENUM_AVAILABLE(NA, 9_0) = 4994,
// The application specified a tag which the system could not find in the application tag manifest
};

2.NSURLError

NS_ENUM(NSInteger) {
NSURLErrorUnknown = -1,
NSURLErrorCancelled = -999,
NSURLErrorBadURL = -1000,
NSURLErrorTimedOut = -1001,
NSURLErrorUnsupportedURL = -1002,
NSURLErrorCannotFindHost = -1003,
NSURLErrorCannotCOnnectToHost= -1004,
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,
NSURLErrorAppTransportSecurityRequiresSecureConnection
NS_ENUM_AVAILABLE(10_11, 9_0) = -1022,
NSURLErrorFileDoesNotExist = -1100,
NSURLErrorFileIsDirectory = -1101,
NSURLErrorNoPermissiOnsToReadFile= -1102,
NSURLErrorDataLengthExceedsMaximum
NS_ENUM_AVAILABLE(10_5, 2_0) = -1103,
// SSL errors
NSURLErrorSecureCOnnectionFailed= -1200,
NSURLErrorServerCertificateHasBadDate = -1201,
NSURLErrorServerCertificateUntrusted = -1202,
NSURLErrorServerCertificateHasUnknownRoot = -1203,
NSURLErrorServerCertificateNotYetValid = -1204,
NSURLErrorClientCertificateRejected = -1205,
NSURLErrorClientCertificateRequired = -1206,
NSURLErrorCannotLoadFromNetwork = -2000,
// Download and file I/O errors
NSURLErrorCannotCreateFile = -3000,
NSURLErrorCannotOpenFile = -3001,
NSURLErrorCannotCloseFile = -3002,
NSURLErrorCannotWriteToFile = -3003,
NSURLErrorCannotRemoveFile = -3004,
NSURLErrorCannotMoveFile = -3005,
NSURLErrorDownloadDecodingFailedMidStream = -3006,
NSURLErrorDownloadDecodingFailedToComplete = -3007,
NSURLErrorInternationalRoamingOff
NS_ENUM_AVAILABLE(10_7, 3_0) = -1018,
NSURLErrorCallIsActive
NS_ENUM_AVAILABLE(10_7, 3_0) = -1019,
NSURLErrorDataNotAllowed
NS_ENUM_AVAILABLE(10_7, 3_0) = -1020,
NSURLErrorRequestBodyStreamExhausted
NS_ENUM_AVAILABLE(10_7, 3_0) = -1021,
NSURLErrorBackgroundSessionRequiresSharedContainer
NS_ENUM_AVAILABLE(10_10, 8_0) = -995,
NSURLErrorBackgroundSessionInUseByAnotherProcess
NS_ENUM_AVAILABLE(10_10, 8_0) = -996,
NSURLErrorBackgroundSessionWasDisconnected
NS_ENUM_AVAILABLE(10_10, 8_0)= -997,
};

推荐阅读
  • UVa 11683: 激光雕刻技术解析
    自1958年发明以来,激光技术已在众多领域得到广泛应用,包括电子设备、医疗手术工具、武器等。本文将探讨如何使用激光技术进行材料雕刻,并通过编程解决一个具体的激光雕刻问题。 ... [详细]
  • 本文详细介绍了如何在本地环境中安装配置Frida及其服务器组件,以及如何通过Frida进行基本的应用程序动态分析,包括获取应用版本和加载的类信息。 ... [详细]
  • 为什么会崩溃? ... [详细]
  • HDU 2537 键盘输入处理
    题目描述了一个名叫Pirates的男孩想要开发一款键盘输入软件,遇到了大小写字母判断的问题。本文提供了该问题的解决方案及实现方法。 ... [详细]
  • 构建Python自助式数据查询系统
    在现代数据密集型环境中,业务团队频繁需要从数据库中提取特定信息。为了提高效率并减少IT部门的工作负担,本文探讨了一种利用Python语言实现的自助数据查询工具的设计与实现。 ... [详细]
  • 本文详细介绍了如何使用 Python 编程语言中的 Scapy 库执行 DNS 欺骗攻击,包括必要的软件安装、攻击流程及代码示例。 ... [详细]
  • 文章目录IntroductionRelatedWork网络稀疏化(NetworkSlimming)whychoosechennel-levelspars ... [详细]
  • 深入解析Java并发之ArrayBlockingQueue
    本文详细探讨了ArrayBlockingQueue,这是一种基于数组实现的阻塞队列。ArrayBlockingQueue在初始化时需要指定容量,因此它是一个有界的阻塞队列。文章不仅介绍了其基本概念和数据结构,还深入分析了其源码实现,包括各种入队、出队、获取元素和删除元素的方法。 ... [详细]
  • 本文提供了一个SQL脚本,用于在Microsoft SQL Server中创建一个数据字典视图,该视图详细列出了表名、表描述、字段名称、字段描述、字段类型、字段大小、字段精度、是否可为空、默认值以及是否为标识或主键等信息。 ... [详细]
  • Python Selenium WebDriver 浏览器驱动详解与实践
    本文详细介绍了如何使用Python结合Selenium和unittest构建自动化测试框架,重点解析了WebDriver浏览器驱动的配置与使用方法,涵盖Chrome、Firefox、IE/Edge等主流浏览器。 ... [详细]
  • 本文探讨了在Python中多线程与多进程的性能差异,特别是在处理CPU密集型任务和I/O密集型任务时的表现。由于全局解释器锁(GIL)的存在,多线程在利用多核CPU方面表现不佳,而多进程则能有效利用多核资源。 ... [详细]
  • Lua字符串1.字符串常见形式字符串或串(String)是由数字、字母、下划线组成的一串字符。Lua语言中字符串可以使用以下三种方式来表示:•单引号间的一串字符。 ... [详细]
  • 本文详细介绍了如何使用Linux下的mysqlshow命令来查询MySQL数据库的相关信息,包括数据库、表以及字段的详情。通过本文的学习,读者可以掌握mysqlshow命令的基本语法及其常用选项。 ... [详细]
  • iOS如何实现手势
    这篇文章主要为大家展示了“iOS如何实现手势”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“iOS ... [详细]
  • Adversarial Personalized Ranking for Recommendation
    目录概主要内容基础对抗扰动对抗训练细节代码HeX.,HeZ.,DuX.andChuaT.Adversarialpersonalizedrankingforrecommendatio ... [详细]
author-avatar
poohyxp
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有