From 35921345d9cf227b84858d186203034e83b7c74f Mon Sep 17 00:00:00 2001 From: Stypox Date: Tue, 27 Aug 2019 13:16:08 +0200 Subject: [PATCH] Use Exception instead of Throwable (more consistent) --- .../youtube/extractors/YoutubeChannelInfoItemExtractor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java index f6eab98f3..03a95abba 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java @@ -66,14 +66,14 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor if (match.matches()) { return YoutubeChannelExtractor.CHANNEL_URL_BASE + match.group(1); } - } catch(Throwable ignored) {} + } catch(Exception ignored) {} try { // fallback method just in case youtube changes things; it should never run and tests will fail // provides an url with "/user/NAME", that is inconsistent with stream and channel extractor return el.select("a[class*=\"yt-uix-tile-link\"]").first() .attr("abs:href"); - } catch (Throwable e) { + } catch (Exception e) { throw new ParsingException("Could not get channel url", e); } }