public final class ExoPlaybackException
extends java.lang.Exception
| Modifier and Type | Class and Description |
|---|---|
static interface |
ExoPlaybackException.Type
The type of source that produced the error.
|
| Modifier and Type | Field and Description |
|---|---|
int |
rendererIndex
If
type is TYPE_RENDERER, this is the index of the renderer. |
int |
type
The type of the playback failure.
|
static int |
TYPE_RENDERER
The error occurred in a
Renderer. |
static int |
TYPE_SOURCE
The error occurred loading data from a
MediaSource. |
static int |
TYPE_UNEXPECTED
The error was an unexpected
RuntimeException. |
| Modifier and Type | Method and Description |
|---|---|
static ExoPlaybackException |
createForRenderer(java.lang.Exception cause,
int rendererIndex)
Creates an instance of type
TYPE_RENDERER. |
static ExoPlaybackException |
createForSource(java.io.IOException cause)
Creates an instance of type
TYPE_SOURCE. |
java.lang.Exception |
getRendererException()
Retrieves the underlying error when
type is TYPE_RENDERER. |
java.io.IOException |
getSourceException()
Retrieves the underlying error when
type is TYPE_SOURCE. |
java.lang.RuntimeException |
getUnexpectedException()
Retrieves the underlying error when
type is TYPE_UNEXPECTED. |
public static final int TYPE_SOURCE
MediaSource.
Call getSourceException() to retrieve the underlying cause.
public static final int TYPE_RENDERER
Renderer.
Call getRendererException() to retrieve the underlying cause.
public static final int TYPE_UNEXPECTED
RuntimeException.
Call getUnexpectedException() to retrieve the underlying cause.
public final int type
public final int rendererIndex
type is TYPE_RENDERER, this is the index of the renderer.public static ExoPlaybackException createForRenderer(java.lang.Exception cause, int rendererIndex)
TYPE_RENDERER.cause - The cause of the failure.rendererIndex - The index of the renderer in which the failure occurred.public static ExoPlaybackException createForSource(java.io.IOException cause)
TYPE_SOURCE.cause - The cause of the failure.public java.io.IOException getSourceException()
type is TYPE_SOURCE.java.lang.IllegalStateException - If type is not TYPE_SOURCE.public java.lang.Exception getRendererException()
type is TYPE_RENDERER.java.lang.IllegalStateException - If type is not TYPE_RENDERER.public java.lang.RuntimeException getUnexpectedException()
type is TYPE_UNEXPECTED.java.lang.IllegalStateException - If type is not TYPE_UNEXPECTED.