סוג GCKError
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחלקה משנית של NSError לשגיאות מסגרת.
יורש את NSError.
הפונקציה יוצרת GCKError עם קוד השגיאה הנתון.
הפונקציה יוצרת GCKError עם קוד השגיאה הנתון ונתונים מותאמים אישית אופציונליים.
מחזירה את התיאור הקריא (לבני אדם) של קוד שגיאה נתון.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון 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\u003e\u003ccode\u003eGCKError\u003c/code\u003e provides a method to retrieve a human-readable description for a given error code.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes methods for constructing instances with specified error codes and custom data.\u003c/p\u003e\n"]]],["The GCKError class, a subclass of NSError, provides methods for handling framework errors. It includes three primary class methods: `errorWithCode:`, which creates a GCKError instance with a specified error code; `errorWithCode:customData:`, which creates a GCKError instance with an error code and optional custom data; and `enumDescriptionForCode:`, which provides a human-readable description for a given error code. These methods are to help with creating error instances and understanding them.\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/docs/reference/ios/interface_g_c_k_error) \\*) | + [errorWithCode:](/cast/docs/reference/ios/interface_g_c_k_error#a44681be97d4f8928a0b7fa6c7fca40ee) |\n| | Constructs a [GCKError](/cast/docs/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/docs/reference/ios/interface_g_c_k_error) \\*) | + [errorWithCode:customData:](/cast/docs/reference/ios/interface_g_c_k_error#a77893a07e9eb79d41b60ee0185381947) |\n| | Constructs a [GCKError](/cast/docs/reference/ios/interface_g_c_k_error \"A subclass of NSError for framework errors. \") with the given error code and optional custom data. [More...](#a77893a07e9eb79d41b60ee0185381947) |\n| ||\n| (NSString \\*) | + [enumDescriptionForCode:](/cast/docs/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/docs/reference/ios/interface_g_c_k_error) \\*) errorWithCode: | | ([GCKErrorCode](/cast/docs/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* | |\n\nConstructs a [GCKError](/cast/docs/reference/ios/interface_g_c_k_error \"A subclass of NSError for framework errors. \") with the given error code. \n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|---------------------------------------------------------------------------------------------|--------------|\n| + ([GCKError](/cast/docs/reference/ios/interface_g_c_k_error) \\*) [errorWithCode:](/cast/docs/reference/ios/interface_g_c_k_error#a44681be97d4f8928a0b7fa6c7fca40ee) | | ([GCKErrorCode](/cast/docs/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* |\n| customData: | | (nullable id) | *customData* |\n| | | | |\n\nConstructs a [GCKError](/cast/docs/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/docs/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* | |\n\nReturns the human-readable description for a given error code."]]