X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Ferr%2FHTTPException.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Ferr%2FHTTPException.java;h=17b578c4987ef644435e47413591b36d792daf1e;hp=0000000000000000000000000000000000000000;hb=ad16325ceea4984f0d383158f167af7791869477;hpb=fc3196828098aab8886568fc673f9e55f4837ce6 diff --git a/app/src/main/java/net/ktnx/mobileledger/err/HTTPException.java b/app/src/main/java/net/ktnx/mobileledger/err/HTTPException.java new file mode 100644 index 00000000..17b578c4 --- /dev/null +++ b/app/src/main/java/net/ktnx/mobileledger/err/HTTPException.java @@ -0,0 +1,33 @@ +/* + * Copyright © 2019 Damyan Ivanov. + * This file is part of MoLe. + * MoLe is free software: you can distribute it and/or modify it + * under the term of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your opinion), any later version. + * + * MoLe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License terms for details. + * + * You should have received a copy of the GNU General Public License + * along with MoLe. If not, see . + */ + +package net.ktnx.mobileledger.err; + +public class HTTPException extends Throwable { + private final int responseCode; + private final String responseMessage; + public int getResponseCode() { + return responseCode; + } + public String getResponseMessage() { + return responseMessage; + } + public HTTPException(int responseCode, String responseMessage) { + this.responseCode = responseCode; + this.responseMessage = responseMessage; + } +}