From fd19e8e9f74cbcca02d46bcf8354110af7b984a7 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 9f8ef2e6c..5404426c4 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 class StoredFileHelper implements Serializable { 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;