# WatchFacePushManager.RemoveWatchFaceException

Artifact: [androidx.wear.watchfacepush:watchfacepush](https://developer.android.com/jetpack/androidx/releases/wear-watchfacepush) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchfacepush/WatchFacePush.kt+class:androidx.wear.watchfacepush.WatchFacePushManager.RemoveWatchFaceException) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchfacepush#1.0.0)

*** ** * ** ***

<br />

```
class WatchFacePushManager.RemoveWatchFaceException : Exception
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||
|   |   | ↳ | [androidx.wear.watchfacepush.WatchFacePushManager.RemoveWatchFaceException](https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException) |

*** ** * ** ***

An exception that can be thrown by `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager#removeWatchFace(kotlin.String)`

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException#ERROR_INVALID_SLOT_ID()` The slot ID provided is not valid. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException#ERROR_UNKNOWN()` Unknown error while removing a watch face. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException#RemoveWatchFaceException(kotlin.Int,kotlin.Throwable)(errorCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, rootCause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException#errorCode()` The specific subtype of error occurred. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException#message()` |

### Inherited functions

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintStream.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintWriter.html)`

### Inherited properties

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/cause.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/localized-message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/stack-trace.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/suppressed.html`

## Constants

### ERROR_INVALID_SLOT_ID

```
const val ERROR_INVALID_SLOT_ID: Int
```

The slot ID provided is not valid. The watch face might have been removed previously, or the ID is simply incorrect. Developers should make sure to retrieve slot IDs by calling `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager#listWatchFaces()` or `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager#addWatchFace(android.os.ParcelFileDescriptor,kotlin.String)`.

### ERROR_UNKNOWN

```
const val ERROR_UNKNOWN: Int
```

Unknown error while removing a watch face. Typically this means that the Watch Face Push service on the watch could not be accessed or that the watch may be in a bad state.

## Public constructors

### RemoveWatchFaceException

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchfacepush#1.0.0)

```
RemoveWatchFaceException(errorCode: Int, rootCause: Throwable)
```

| Parameters |
|---|---|
| `errorCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The specific subtype of error occurred. See `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException.Companion.ErrorCode` for the possible values. |
| `rootCause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` | The exception that caused the problem in the first place. |

## Public properties

### errorCode

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchfacepush#1.0.0)

```
val errorCode: Int
```

The specific subtype of error occurred. See `https://developer.android.com/reference/kotlin/androidx/wear/watchfacepush/WatchFacePushManager.RemoveWatchFaceException.Companion.ErrorCode` for the possible values.

### message

```
open val message: String?
```