From 0c2507d0f8fdfd1a780bedd9bdaa6d8f3b26f848 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sun, 17 Sep 2023 15:25:47 +0200 Subject: [PATCH] Replace RuntimeException with IOException The RuntimeException was not explicitly declared and thus not caught at every call of this constructor. This change ensures that this possible exception is handled by the dedicated error handlers. --- .../java/org/schabi/newpipe/streams/io/StoredFileHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/streams/io/StoredFileHelper.java b/app/src/main/java/org/schabi/newpipe/streams/io/StoredFileHelper.java index 9f8ef2e6c6c..5404426c432 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/io/StoredFileHelper.java +++ b/app/src/main/java/org/schabi/newpipe/streams/io/StoredFileHelper.java @@ -130,7 +130,7 @@ public StoredFileHelper(final Context context, @Nullable final Uri parent, final DocumentFile file = DocumentFile.fromSingleUri(context, path); if (file == null) { - throw new RuntimeException("SAF not available"); + throw new IOException("SAF not available"); } this.context = context;