/** * Creates an instance of type {@link #TYPE_SOURCE}. * * @param cause The cause of the failure. * @return The created instance. */ public static ExoPlaybackException createForSource(IOException cause) { return new ExoPlaybackException(TYPE_SOURCE, cause, C.INDEX_UNSET); }
/** * Creates an instance of type {@link #TYPE_UNEXPECTED}. * * @param cause The cause of the failure. * @return The created instance. */ /* package */ static ExoPlaybackException createForUnexpected(RuntimeException cause) { return new ExoPlaybackException(TYPE_UNEXPECTED, cause, C.INDEX_UNSET); }
/** * Creates an instance of type {@link #TYPE_RENDERER}. * * @param cause The cause of the failure. * @param rendererIndex The index of the renderer in which the failure occurred. * @return The created instance. */ public static ExoPlaybackException createForRenderer(Exception cause, int rendererIndex) { return new ExoPlaybackException(TYPE_RENDERER, cause, rendererIndex); }