# LoaderErrorThrower

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/upstream/LoaderErrorThrower.java+class:androidx.media3.exoplayer.upstream.LoaderErrorThrower)

*** ** * ** ***


```
@UnstableApi
public interface LoaderErrorThrower
```

<br />

Known direct subclasses [LoaderErrorThrower.Placeholder](https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower.Placeholder), [Loader](https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader)

|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower.Placeholder` | A `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower` that never throws. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader` | Manages the background loading of `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader.Loadable`s. |

*** ** * ** ***

Conditionally throws errors affecting a `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader`.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower.Placeholder implements https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower` A `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower` that never throws. |

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower#maybeThrowError()()` Throws a fatal error, or a non-fatal error if loading is currently backed off and the current `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader.Loadable` has incurred a number of errors greater than the `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader`s default minimum number of retries. |
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/LoaderErrorThrower#maybeThrowError(int)(int minRetryCount)` Throws a fatal error, or a non-fatal error if loading is currently backed off and the current `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader.Loadable` has incurred a number of errors greater than the specified minimum number of retries. |

## Public methods

### maybeThrowError

```
abstract void maybeThrowError()
```

Throws a fatal error, or a non-fatal error if loading is currently backed off and the current `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader.Loadable` has incurred a number of errors greater than the `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader`s default minimum number of retries. Else does nothing.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | The error. |

### maybeThrowError

```
abstract void maybeThrowError(int minRetryCount)
```

Throws a fatal error, or a non-fatal error if loading is currently backed off and the current `https://developer.android.com/reference/androidx/media3/exoplayer/upstream/Loader.Loadable` has incurred a number of errors greater than the specified minimum number of retries. Else does nothing.

| Parameters |
|---|---|
| `int minRetryCount` | A minimum retry count that must be exceeded for a non-fatal error to be thrown. Should be non-negative. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | The error. |