Skip to content

Commit 95f2ab1

Browse files
committed
Fix error detection when loading main page tabs
Do not crash if something unexpected happens.
1 parent 4b5382d commit 95f2ab1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import org.schabi.newpipe.R;
3838
import org.schabi.newpipe.databinding.FragmentMainBinding;
3939
import org.schabi.newpipe.error.ErrorUtil;
40-
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
4140
import org.schabi.newpipe.local.playlist.LocalPlaylistFragment;
4241
import org.schabi.newpipe.settings.tabs.Tab;
4342
import org.schabi.newpipe.settings.tabs.TabsManager;
@@ -303,7 +302,7 @@ public Fragment getItem(final int position) {
303302
final Fragment fragment;
304303
try {
305304
fragment = tab.getFragment(context);
306-
} catch (final ExtractionException e) {
305+
} catch (final Exception e) {
307306
ErrorUtil.showUiErrorSnackbar(context, "Getting fragment item", e);
308307
return new BlankFragment();
309308
}

0 commit comments

Comments
 (0)