Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Fields](https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#lfields) \| [Ctors](https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#pubctors) \| [Methods](https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#inhmethods)

# WatchFacePushManager.AddException


`
public
static


class
WatchFacePushManager.AddException
`


`


`

`


`

`


`

`

extends RuntimeException


`

`


`

|---|---|---|---|---|
| java.lang.Object |||||
| ↳ | java.lang.Throwable ||||
|   | ↳ | java.lang.Exception |||
|   |   | ↳ | java.lang.RuntimeException ||
|   |   |   | ↳ | com.google.wear.services.watchfaces.watchfacepush.WatchFacePushManager.AddException |

<br />

*** ** * ** ***

Exception representing an error of the `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager#addWatchFace(android.os.ParcelFileDescriptor,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<com.google.wear.services.watchfaces.watchfacepush.WatchFaceSlot,com.google.wear.services.watchfaces.watchfacepush.WatchFacePushManager.AddException>)` method.

## Summary

| ### Fields ||
|---|---|
| ` public static final int` | `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_CONTENT_ERROR` The provided file is not a valid Android APK. |
| ` public static final int` | `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_PACKAGE_NAME_ERROR` The watch face package name is invalid. |
| ` public static final int` | `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_VALIDATION_TOKEN_ERROR` The validation token is invalid. |
| ` public static final int` | `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_SECURITY_ERROR` Security exception when attempting to install an APK. |
| ` public static final int` | `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_SLOT_LIMIT_REACHED_ERROR` The watch face slot limit has been reached. |
| ` public static final int` | `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_UNKNOWN_ERROR` Unknown error while adding a watch face. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#AddException(int)(int errorCode) ` |
| ` https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#AddException(java.lang.Throwable)(Throwable cause) ` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#getErrorCode()() ` |

| ### Inherited methods |
|---|---|
| From class ` java.lang.Throwable ` |---|---| | ` final void` | ` addSuppressed(Throwable arg0) ` | | ` Throwable` | ` fillInStackTrace() ` | | ` Throwable` | ` getCause() ` | | ` String` | ` getLocalizedMessage() ` | | ` String` | ` getMessage() ` | | ` StackTraceElement[]` | ` getStackTrace() ` | | ` final Throwable[]` | ` getSuppressed() ` | | ` Throwable` | ` initCause(Throwable arg0) ` | | ` void` | ` printStackTrace() ` | | ` void` | ` printStackTrace(PrintWriter arg0) ` | | ` void` | ` printStackTrace(PrintStream arg0) ` | | ` void` | ` setStackTrace(StackTraceElement[] arg0) ` | | ` String` | ` toString() ` | ||
| From class ` java.lang.Object ` |---|---| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class<?>` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||

## Fields

### ADD_INVALID_CONTENT_ERROR

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ADD_INVALID_CONTENT_ERROR
```

The provided file is not a valid Android APK.

<br />

### ADD_INVALID_PACKAGE_NAME_ERROR

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ADD_INVALID_PACKAGE_NAME_ERROR
```

The watch face package name is invalid. See `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager#addWatchFace(android.os.ParcelFileDescriptor,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<com.google.wear.services.watchfaces.watchfacepush.WatchFaceSlot,com.google.wear.services.watchfaces.watchfacepush.WatchFacePushManager.AddException>)` for
the required package name structure.

<br />

### ADD_INVALID_VALIDATION_TOKEN_ERROR

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ADD_INVALID_VALIDATION_TOKEN_ERROR
```

The validation token is invalid.

<br />

### ADD_SECURITY_ERROR

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ADD_SECURITY_ERROR
```

Security exception when attempting to install an APK.

Note: The APK must be a DWF watchface which only contains a declarative XML file for
the watchface layout and other resource files. The APK can't contain any executable code.

<br />

### ADD_SLOT_LIMIT_REACHED_ERROR

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ADD_SLOT_LIMIT_REACHED_ERROR
```

The watch face slot limit has been reached.

<br />

### ADD_UNKNOWN_ERROR

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ADD_UNKNOWN_ERROR
```

Unknown error while adding a watch face.

<br />

## Public constructors

### AddException

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AddException (int errorCode)
```

<br />

<br />

| Parameters ||
|---|---|
| `errorCode` | `int`: Value is one of the following: - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_UNKNOWN_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_SECURITY_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_PACKAGE_NAME_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_CONTENT_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_SLOT_LIMIT_REACHED_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_VALIDATION_TOKEN_ERROR` |

### AddException

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AddException (Throwable cause)
```

<br />

<br />

| Parameters ||
|---|---|
| `cause` | `Throwable` <br /> |

## Public methods

### getErrorCode

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getErrorCode ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_UNKNOWN_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_SECURITY_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_PACKAGE_NAME_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_CONTENT_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_SLOT_LIMIT_REACHED_ERROR` - `https://developer.android.com/reference/com/google/wear/services/watchfaces/watchfacepush/WatchFacePushManager.AddException#ADD_INVALID_VALIDATION_TOKEN_ERROR` |