GCKError Class
Stay organized with collections
Save and categorize content based on your preferences.
A subclass of NSError for framework errors.
Inherits NSError.
Constructs a GCKError with the given error code.
Constructs a GCKError with the given error code and optional custom data.
Returns the human-readable description for a given error code.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["\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."]]