From 311dabba1763fda9e42a99fa341b0fa9e1c4b7d8 Mon Sep 17 00:00:00 2001 From: seven332 Date: Thu, 4 Apr 2019 10:20:20 +0800 Subject: [PATCH] Throw ParseException if no gallery found --- .../com/hippo/ehviewer/client/parser/GalleryListParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java index 0e8ac71ed..0a4e5d12c 100644 --- a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java +++ b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java @@ -345,6 +345,9 @@ public class GalleryListParser { list.add(gi); } } + if (list.isEmpty()) { + throw new ParseException("No gallery", body); + } result.galleryInfoList = list; } catch (Throwable e) { ExceptionUtils.throwIfFatal(e);