GCKError 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-05。
[null,null,["最后更新时间 (UTC):2022-12-05。"],[[["\u003cp\u003e\u003ccode\u003eGCKError\u003c/code\u003e is a subclass of \u003ccode\u003eNSError\u003c/code\u003e specifically designed for Google Cast framework errors.\u003c/p\u003e\n"],["\u003cp\u003eYou can construct a \u003ccode\u003eGCKError\u003c/code\u003e instance with an error code and optional custom data.\u003c/p\u003e\n"],["\u003cp\u003eA human-readable description can be obtained for any given \u003ccode\u003eGCKErrorCode\u003c/code\u003e using the \u003ccode\u003eenumDescriptionForCode:\u003c/code\u003e method.\u003c/p\u003e\n"]]],["The `GCKError` class, a subclass of `NSError`, provides methods for handling framework errors. Key actions include constructing `GCKError` objects using `errorWithCode:` and `errorWithCode:customData:`, where the latter allows for optional custom data. Additionally, `enumDescriptionForCode:` retrieves a human-readable description corresponding to a specified error code. These static methods enable developers to create and interpret `GCKError` instances.\n"],null,["# GCKError Class\n\n[Class Methods](#pub-static-methods) \nGCKError Class Reference \n\nOverview\n--------\n\nA subclass of [**NSError**](https://goo.gl/WJbrdL) for framework errors.\n\nInherits NSError.\n\n|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Class Method Summary -------------------- ||\n| ([GCKError](/cast/v3/reference/ios/interface_g_c_k_error) \\*) | + [errorWithCode:](/cast/v3/reference/ios/interface_g_c_k_error#a44681be97d4f8928a0b7fa6c7fca40ee) |\n| | Constructs a [GCKError](/cast/v3/reference/ios/interface_g_c_k_error \"A subclass of NSError for framework errors. \") with the given error code. [More...](#a44681be97d4f8928a0b7fa6c7fca40ee) |\n| ||\n| ([GCKError](/cast/v3/reference/ios/interface_g_c_k_error) \\*) | + [errorWithCode:customData:](/cast/v3/reference/ios/interface_g_c_k_error#a79cf033c1a9901add43e0d7340184cf8) |\n| | Constructs a [GCKError](/cast/v3/reference/ios/interface_g_c_k_error \"A subclass of NSError for framework errors. \") with the given error code and optional custom data. [More...](#a79cf033c1a9901add43e0d7340184cf8) |\n| ||\n| (NSString \\*) | + [enumDescriptionForCode:](/cast/v3/reference/ios/interface_g_c_k_error#ab5bab1c17db638b4acea016984c0d96f) |\n| | Returns the human-readable description for a given error code. [More...](#ab5bab1c17db638b4acea016984c0d96f) |\n| ||\n\nMethod Detail\n-------------\n\n|--------------------------------------------------------------------------------|---|-------------------------------------------------------------------------------------------|--------|---|\n| + ([GCKError](/cast/v3/reference/ios/interface_g_c_k_error) \\*) errorWithCode: | | ([GCKErrorCode](/cast/v3/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* | |\n\nConstructs a [GCKError](/cast/v3/reference/ios/interface_g_c_k_error \"A subclass of NSError for framework errors. \") with the given error code. \n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|-------------------------------------------------------------------------------------------|--------------|\n| + ([GCKError](/cast/v3/reference/ios/interface_g_c_k_error) \\*) [errorWithCode:](/cast/v3/reference/ios/interface_g_c_k_error#a44681be97d4f8928a0b7fa6c7fca40ee) | | ([GCKErrorCode](/cast/v3/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* |\n| customData: | | (id __nullable) | *customData* |\n| | | | |\n\nConstructs a [GCKError](/cast/v3/reference/ios/interface_g_c_k_error \"A subclass of NSError for framework errors. \") with the given error code and optional custom data. \n\n|-----------------------------------------|---|-------------------------------------------------------------------------------------------|--------|---|\n| + (NSString \\*) enumDescriptionForCode: | | ([GCKErrorCode](/cast/v3/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* | |\n\nReturns the human-readable description for a given error code."]]