# DefaultErrorMessageProvider

Artifact: [androidx.media3:media3-ui-compose-material3](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/ui/compose/material3/text/DefaultErrorMessageProvider.kt+class:androidx.media3.ui.compose.material3.text.DefaultErrorMessageProvider)


```
@UnstableApi
class DefaultErrorMessageProvider : ErrorMessageProvider<PlaybackException>
```

<br />

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/material3/text/DefaultErrorMessageProvider#DefaultErrorMessageProvider(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html)` |

| ### Public functions |
|---|---|
| `open https://developer.android.com/reference/android/util/Pair.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/material3/text/DefaultErrorMessageProvider#getErrorMessage(androidx.media3.common.PlaybackException)(throwable: https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException)` Returns a pair consisting of an error code and a user readable error message for the given throwable. |

## Public constructors

### DefaultErrorMessageProvider

```
DefaultErrorMessageProvider(context: Context)
```

## Public functions

### getErrorMessage

```
open fun getErrorMessage(throwable: PlaybackException): Pair<Int, String>
```

Returns a pair consisting of an error code and a user readable error message for the given throwable.

| Parameters |
|---|---|
| `throwable: https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException` | The throwable for which an error code and message should be generated. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/util/Pair.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | A pair consisting of an error code and a user readable error message. |