# AppFunctionException

Artifact: [androidx.appfunctions:appfunctions](https://developer.android.com/jetpack/androidx/releases/appfunctions) [View Source](https://cs.android.com/search?q=file:androidx/appfunctions/AppFunctionException.kt+class:androidx.appfunctions.AppFunctionException) Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

*** ** * ** ***


```
abstract class AppFunctionException : 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.appfunctions.AppFunctionException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionException) |

Known direct subclasses [AppFunctionAppException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionAppException), [AppFunctionRequestException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionRequestException), [AppFunctionSystemException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionSystemException), [AppFunctionUnknownException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionUnknownException)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionAppException` | Thrown when an error is caused by the app providing the function. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionRequestException` | Thrown when the error is caused by the app requesting a function execution. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionSystemException` | Thrown when an internal unexpected error comes from the system. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionUnknownException` | Thrown when an unknown error has occurred. |

Known indirect subclasses [AppFunctionAppUnknownException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionAppUnknownException), [AppFunctionCancelledException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionCancelledException), [AppFunctionDeniedException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionDeniedException), [AppFunctionDisabledException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionDisabledException), [AppFunctionElementAlreadyExistsException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionElementAlreadyExistsException), [AppFunctionElementNotFoundException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionElementNotFoundException), [AppFunctionFunctionNotFoundException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionFunctionNotFoundException), [AppFunctionInvalidArgumentException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionInvalidArgumentException), [AppFunctionLimitExceededException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionLimitExceededException), [AppFunctionNotSupportedException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionNotSupportedException), [AppFunctionPermissionRequiredException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionPermissionRequiredException), [AppFunctionSystemUnknownException](https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionSystemUnknownException)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionAppUnknownException` | Thrown when an unknown error occurred while processing the call in the AppFunctionService. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionCancelledException` | Thrown when an operation was cancelled. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionDeniedException` | Thrown when the caller does not have the permission to execute an app function. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionDisabledException` | Thrown when the caller tried to execute a disabled app function. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionElementAlreadyExistsException` | Thrown when the caller tried to create a resource/entity that already exists or has conflicts with existing resource/entity. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionElementNotFoundException` | Thrown when the caller tried to request a resource/entity that does not exist. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionFunctionNotFoundException` | Thrown when the caller tries to execute a function that does not exist. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionInvalidArgumentException` | Thrown when the caller supplied invalid arguments to `https://developer.android.com/reference/kotlin/androidx/appfunctions/ExecuteAppFunctionRequest`'s parameters. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionLimitExceededException` | Thrown when the caller exceeded the allowed request rate. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionNotSupportedException` | Thrown when an app receives a request to perform an unsupported action. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionPermissionRequiredException` | Thrown when the app lacks the necessary permission to fulfill the request. |
| `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionSystemUnknownException` | Thrown when an internal unexpected error comes from the system. |

*** ** * ** ***

An exception that is thrown when an error occurs during an app function execution.

This exception can be used by the app to report errors to the caller.

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/appfunctions/AppFunctionException#errorMessage()` The error 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/-string/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/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`

## Public properties

### errorMessage

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

```
val errorMessage: String?
```

The error message.