# CrossDevicePromptException

*** ** * ** ***


```
class CrossDevicePromptException : ApiException
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||
|   |   | ↳ | [com.google.android.gms.common.api.ApiException](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html) ||
|   |   |   | ↳ | [com.google.android.play.core.crossdeviceprompt.CrossDevicePromptException](https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/CrossDevicePromptException) |

*** ** * ** ***

An exception indicating something went wrong with the Cross Device Prompt API.

See `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/CrossDevicePromptException#getErrorCode()` for the specific problem.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/CrossDevicePromptException#CrossDevicePromptException(int)(@https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/model/CrossDevicePromptErrorCode errorCode: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/CrossDevicePromptException#CrossDevicePromptException(com.google.android.gms.common.api.Status)(status: https://developers.google.com/android/reference/com/google/android/gms/common/api/Status.html!)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/model/CrossDevicePromptErrorCode https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/CrossDevicePromptException#getErrorCode()()` Returns an error code value from `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/model/CrossDevicePromptErrorCode`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/CrossDevicePromptException#getStatusCode()()` Returns the error code resulting from the operation. |

| ### Inherited functions |
|---|
| From [com.google.android.gms.common.api.ApiException](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html) |---|---| | `https://developers.google.com/android/reference/com/google/android/gms/common/api/Status.html!` | `https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#getStatus--()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#getStatusMessage--()` **This function is deprecated.** | |
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/add-suppressed.html(p: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!)` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/fill-in-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-message.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!>!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-suppressed.html()` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/init-cause.html(p: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!)` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/set-stack-trace.html(p: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/to-string.html()` | |

| ### Inherited properties |
|---|
| From [com.google.android.gms.common.api.ApiException](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html) |---|---| | `https://developers.google.com/android/reference/com/google/android/gms/common/api/Status.html!` | `https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#mStatus--` **This property is deprecated.** | |

## Public constructors

### CrossDevicePromptException

```
CrossDevicePromptException(@CrossDevicePromptErrorCode errorCode: Int)
```

### CrossDevicePromptException

```
CrossDevicePromptException(status: Status!)
```

## Public functions

### getErrorCode

```
@CrossDevicePromptErrorCode
fun getErrorCode(): Int
```

Returns an error code value from `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/model/CrossDevicePromptErrorCode`.

### getStatusCode

```
fun getStatusCode(): Int
```

Returns the error code resulting from the operation. The value is one of the constants in `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/model/CrossDevicePromptErrorCode`. getStatusCode() is unsupported by `https://developer.android.com/reference/kotlin/com/google/android/play/core/crossdeviceprompt/CrossDevicePromptException`, please use getErrorCode() instead.