From 6717c2cd8c85d4f0ef42ff5a8ed72d72154fcea4 Mon Sep 17 00:00:00 2001 From: Hammy Date: Sun, 6 Jun 2021 04:19:47 +0100 Subject: [PATCH] Add CustomException Class APIResponseException.java Throwing one single exception when catching many different ones within the sendRequest() method of MyWaifuWrapper.java --- .../goudham/me/exception/APIResponseException.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/org/goudham/me/exception/APIResponseException.java diff --git a/src/main/java/org/goudham/me/exception/APIResponseException.java b/src/main/java/org/goudham/me/exception/APIResponseException.java new file mode 100644 index 0000000..b7017ae --- /dev/null +++ b/src/main/java/org/goudham/me/exception/APIResponseException.java @@ -0,0 +1,14 @@ +package org.goudham.me.exception; + + +import org.goudham.me.MyWaifuWrapper; + +/** + * Thrown when {@link MyWaifuWrapper} + * + */ +public class APIResponseException extends Throwable { + public APIResponseException(String errorMessage, Throwable error) { + super(errorMessage, error); + } +}