# WatchFacePushManager.IsWatchFaceActiveException

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.IsWatchFaceActiveException) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchfacepush#1.0.0)

*** ** * ** ***


```
public final class WatchFacePushManager.IsWatchFaceActiveException extends Exception
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||
|   |   | ↳ | [androidx.wear.watchfacepush.WatchFacePushManager.IsWatchFaceActiveException](https://developer.android.com/reference/androidx/wear/watchfacepush/WatchFacePushManager.IsWatchFaceActiveException) |

*** ** * ** ***

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

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchfacepush/WatchFacePushManager.IsWatchFaceActiveException#ERROR_INVALID_PACKAGE_NAME()` The package name provided is not valid. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchfacepush/WatchFacePushManager.IsWatchFaceActiveException#ERROR_UNKNOWN()` Unknown error while querying for watch face. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/watchfacepush/WatchFacePushManager.IsWatchFaceActiveException#IsWatchFaceActiveException(kotlin.Int,kotlin.Throwable)(int errorCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html rootCause)` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/wear/watchfacepush/WatchFacePushManager.IsWatchFaceActiveException#getErrorCode()()` The specific subtype of error occurred. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/watchfacepush/WatchFacePushManager.IsWatchFaceActiveException#getMessage()()` |

### Inherited methods

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html exception)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/annotation/RecentlyNullable
https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()()` `@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull Throwable[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintStream)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintStream.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintWriter.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[] stackTrace)`

## Constants

### ERROR_INVALID_PACKAGE_NAME

```
public static final int ERROR_INVALID_PACKAGE_NAME
```

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

### ERROR_UNKNOWN

```
public static final int ERROR_UNKNOWN
```

Unknown error while querying for 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

### IsWatchFaceActiveException

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

```
public IsWatchFaceActiveException(int errorCode, @NonNull Throwable rootCause)
```

| Parameters |
|---|---|
| `int errorCode` | The specific subtype of error occurred. See `https://developer.android.com/reference/androidx/wear/watchfacepush/WatchFacePushManager.IsWatchFaceActiveException.Companion.ErrorCode` for the possible values. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html rootCause` | The exception that caused the problem in the first place. |

## Public methods

### getErrorCode

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

```
public final int getErrorCode()
```

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

### getMessage

```
public String getMessage()
```