# AppEngageException

# AppEngageException

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/com/google/android/engage/service/AppEngageException "View this page in Java")  

<br />

```
class AppEngageException : 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.engage.service.AppEngageException](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageException) |

*** ** * ** ***

An exception indicating something went wrong with the App Engage API.

See[getErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageException#getErrorCode())for the specific problem.

## Summary

|                                                                                                                                                                                                                                         ### Public constructors                                                                                                                                                                                                                                         |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AppEngageException](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageException#AppEngageException(int))`(@`[AppEngageErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageErrorCode)` errorCode: `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)`                                                                                                                               |
| [AppEngageException](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageException#AppEngageException(int,java.lang.String))`(` ` @`[AppEngageErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageErrorCode)` errorCode: `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`,` ` errorMessage: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!` `)` |

|                            ### Public functions                            |
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `@`[AppEngageErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageErrorCode) [getErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageException#getErrorCode())`()` Returns an error code value from[AppEngageErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageErrorCode). |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getStatusCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageException#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) |------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Status](https://developers.google.com/android/reference/com/google/android/gms/common/api/Status.html)`!` | [getStatus](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#getStatus--)`()`                                                | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!`                        | [getStatusMessage](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 `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                 | [addSuppressed](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/add-suppressed.html)`(p: `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`!)`                                                                                            | | `synchronized `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`!`                                                                                    | [fillInStackTrace](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/fill-in-stack-trace.html)`()`                                                                                                                                                                                | | `synchronized `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`!`                                                                                    | [getCause](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-cause.html)`()`                                                                                                                                                                                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!`                                                                                                         | [getLocalizedMessage](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-localized-message.html)`()`                                                                                                                                                                           | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!`                                                                                                         | [getMessage](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-message.html)`()`                                                                                                                                                                                              | | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)`<`[StackTraceElement](https://developer.android.com/reference/java/lang/StackTraceElement.html)`!>!`         | [getStackTrace](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-stack-trace.html)`()`                                                                                                                                                                                       | | `synchronized `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)`<`[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`!>!` | [getSuppressed](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-suppressed.html)`()`                                                                                                                                                                                        | | `synchronized `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`!`                                                                                    | [initCause](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/init-cause.html)`(p: `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`!)`                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                | [printStackTrace](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html)`()`                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                | [setStackTrace](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/set-stack-trace.html)`(p: `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)`<`[StackTraceElement](https://developer.android.com/reference/java/lang/StackTraceElement.html)`!>!)` | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!`                                                                                                         | [toString](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) |------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | [Status](https://developers.google.com/android/reference/com/google/android/gms/common/api/Status.html)`!` | [mStatus](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#mStatus--) **This property is deprecated.** | |

## Public constructors

### AppEngageException

```
AppEngageException(@AppEngageErrorCode errorCode: Int)
```  

### AppEngageException

```
AppEngageException(
    @AppEngageErrorCode errorCode: Int,
    errorMessage: String!
)
```  

## Public functions

### getErrorCode

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

Returns an error code value from[AppEngageErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageErrorCode).  

### getStatusCode

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

Returns the error code resulting from the operation. The value is one of the constants in[AppEngageErrorCode](https://developer.android.com/reference/kotlin/com/google/android/engage/service/AppEngageErrorCode). getStatusCode() is unsupported by AppEngageException, please use getErrorCode() instead.