From 74b126dfc406742e14fd0d6e8510168eebe67b10 Mon Sep 17 00:00:00 2001 From: tonihei Date: Tue, 11 May 2021 15:22:23 +0100 Subject: [PATCH] Don't wrap FileDataSourceException in FileDataSourceException. Instead just forward the existing exception. PiperOrigin-RevId: 373145328 --- .../com/google/android/exoplayer2/upstream/FileDataSource.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSource.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSource.java index 0428c0a66f..47debf2767 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSource.java @@ -92,6 +92,8 @@ public final class FileDataSource extends BaseDataSource { if (bytesRemaining < 0) { throw new DataSourceException(DataSourceException.POSITION_OUT_OF_RANGE); } + } catch (FileDataSourceException e) { + throw e; } catch (IOException e) { throw new FileDataSourceException(e); }