From fff52d1ec6061e936136b604bbe9164480640e81 Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Tue, 11 Sep 2018 18:13:49 +0300 Subject: [PATCH] add parse exception constructor --- .../main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java | 2 +- .../java/gr/thmmy/mthmmy/utils/parsing/ParseException.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java b/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java index 4c23c241..0d19c098 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java @@ -13,7 +13,7 @@ public abstract class NewParseTask extends NetworkTask { try { return parse(document); } catch (Exception e) { - throw new ParseException("Parse failed."); + throw new ParseException("Parse failed.", e); } } diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/ParseException.java b/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/ParseException.java index fea7be6b..abda1f38 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/ParseException.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/ParseException.java @@ -10,4 +10,8 @@ public class ParseException extends Exception { { super(message); } + + public ParseException(String message, Throwable cause) { + super(message, cause); + } }