public class RiotApiException
extends java.lang.Exception
Modifier and Type | Field and Description |
---|---|
static int |
BAD_GATEWAY |
static int |
BAD_REQUEST |
static int |
DATA_NOT_FOUND |
static int |
FORBIDDEN |
static int |
GATEWAY_TIMEOUT |
static int |
IOEXCEPTION |
static int |
METHOD_NOT_ALLOWED |
static int |
MISSING_API_KEY |
static int |
MISSING_TOURNAMENT_API_KEY |
static int |
NOT_IMPLEMENTED |
static int |
NULLPOINTEREXCEPTION |
static int |
PARSE_FAILURE |
static int |
RATE_LIMITED |
static int |
SERVER_ERROR |
static int |
TIMEOUT_EXCEPTION |
static int |
UNAUTHORIZED |
static int |
UNAVAILABLE |
static int |
UNPROCESSABLE_ENTITY |
static int |
UNSUPPORTED_MEDIA_TYPE |
Constructor and Description |
---|
RiotApiException(int errorCode)
Constructs a
RiotApiException with the specified error code. |
RiotApiException(int errorCode,
RiotApiError errorDto)
Constructs a
RiotApiException with the specified error code and error dto, as sent by the Riot Api. |
RiotApiException(int errorCode,
java.lang.String message)
Constructs a
RiotApiException with the specified error code and error message. |
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Gets the error code of this
RiotApiException |
RiotApiError |
getErrorDto()
Gets the error DTO as sent by the Riot Api
|
java.lang.String |
getMessage() |
static java.lang.String |
getMessage(int errorCode)
Returns a short description for the specified error code.
|
public static final int BAD_REQUEST
public static final int UNAUTHORIZED
public static final int FORBIDDEN
public static final int DATA_NOT_FOUND
public static final int METHOD_NOT_ALLOWED
public static final int UNSUPPORTED_MEDIA_TYPE
public static final int UNPROCESSABLE_ENTITY
public static final int RATE_LIMITED
public static final int SERVER_ERROR
public static final int NOT_IMPLEMENTED
public static final int BAD_GATEWAY
public static final int UNAVAILABLE
public static final int GATEWAY_TIMEOUT
public static final int PARSE_FAILURE
public static final int IOEXCEPTION
public static final int NULLPOINTEREXCEPTION
public static final int TIMEOUT_EXCEPTION
public static final int MISSING_API_KEY
public static final int MISSING_TOURNAMENT_API_KEY
public RiotApiException(int errorCode, RiotApiError errorDto)
RiotApiException
with the specified error code and error dto, as sent by the Riot Api.errorCode
- Error codemessage
- Error messagepublic RiotApiException(int errorCode, java.lang.String message)
RiotApiException
with the specified error code and error message.errorCode
- Error codemessage
- Error messagepublic RiotApiException(int errorCode)
RiotApiException
with the specified error code.errorCode
- Error codepublic int getErrorCode()
RiotApiException
public RiotApiError getErrorDto()
RiotApiError
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public static java.lang.String getMessage(int errorCode)
errorCode
- Error code