# HostException

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/HostException.java+class:androidx.car.app.HostException) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
class HostException : RuntimeException
```

<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) |||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html) ||
|   |   |   | ↳ | [androidx.car.app.HostException](https://developer.android.com/reference/kotlin/androidx/car/app/HostException) |

*** ** * ** ***

Exceptions that happen on calls to the host.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/HostException#HostException(java.lang.Throwable)(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HostException` with the given `cause`. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/HostException#HostException(java.lang.String)(message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HostException` with the given `message`. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/HostException#HostException(java.lang.String,java.lang.Throwable)(message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HostException` with the given `message`. |

| ### Inherited functions |
|---|
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized 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!)` | | `synchronized 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()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html()` | | `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/get-stack-trace.html()` | | `synchronized 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/get-suppressed.html()` | | `synchronized 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/set-stack-trace.html(stackTrace: 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/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()` | |

## Public constructors

### HostException

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

```
HostException(cause: Throwable)
```

Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HostException` with the given `cause`.

| Parameters |
|---|---|
| `cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` | the originating cause of the exception |

### HostException

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

```
HostException(message: String)
```

Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HostException` with the given `message`.

| Parameters |
|---|---|
| `message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the exception message |

### HostException

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

```
HostException(message: String, cause: Throwable)
```

Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HostException` with the given `message`.

| Parameters |
|---|---|
| `message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the exception message |
| `cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` | the originating cause of the exception |