# GCKError Class

[Class Methods](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#pub-static-methods) GCKError Class Reference

## Overview

A subclass of [**NSError**](https://goo.gl/WJbrdL) for framework errors.

Inherits NSError.

|---|---|
| ## Class Method Summary ||
| ([GCKError](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error) \*) | + [errorWithCode:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#a44681be97d4f8928a0b7fa6c7fca40ee) |
|   | Constructs a [GCKError](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error "A subclass of NSError for framework errors. ") with the given error code. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#a44681be97d4f8928a0b7fa6c7fca40ee) |
|   ||
| ([GCKError](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error) \*) | + [errorWithCode:customData:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#a79cf033c1a9901add43e0d7340184cf8) |
|   | Constructs a [GCKError](https://developers.google.com/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...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#a79cf033c1a9901add43e0d7340184cf8) |
|   ||
| (NSString \*) | + [enumDescriptionForCode:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#ab5bab1c17db638b4acea016984c0d96f) |
|   | Returns the human-readable description for a given error code. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#ab5bab1c17db638b4acea016984c0d96f) |
|   ||

## Method Detail

|---|---|---|---|---|
| + ([GCKError](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error) \*) errorWithCode: |   | ([GCKErrorCode](https://developers.google.com/cast/v3/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* |   |

Constructs a [GCKError](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error "A subclass of NSError for framework errors. ") with the given error code.

|---|---|---|---|
| + ([GCKError](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error) \*) [errorWithCode:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_error#a44681be97d4f8928a0b7fa6c7fca40ee) |   | ([GCKErrorCode](https://developers.google.com/cast/v3/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* |
| customData: |   | (id __nullable) | *customData* |
|   |   |   |   |

Constructs a [GCKError](https://developers.google.com/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.

|---|---|---|---|---|
| + (NSString \*) enumDescriptionForCode: |   | ([GCKErrorCode](https://developers.google.com/cast/v3/reference/ios/g_c_k_error_8h#aea7a716be62f301015e255e1ba63a9cc)) | *code* |   |

Returns the human-readable description for a given error code.