Class TelegramApiRequestException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
- org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException
-
- All Implemented Interfaces:
Serializable
public class TelegramApiRequestException extends TelegramApiException
- Version:
- 1.0 Exception thrown when something goes wrong in the api
- Author:
- Ruben Bermudez
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TelegramApiRequestException(String message)
TelegramApiRequestException(String message, Throwable cause)
TelegramApiRequestException(String message, org.json.JSONObject object)
TelegramApiRequestException(String message, ApiResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getApiResponse()
Integer
getErrorCode()
String
getMessage()
More detailed error description.ResponseParameters
getParameters()
String
toString()
Just left as backward compatibility if anybody used this in version 5.2.0 or older.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
TelegramApiRequestException
public TelegramApiRequestException(String message)
-
TelegramApiRequestException
public TelegramApiRequestException(String message, org.json.JSONObject object)
-
TelegramApiRequestException
public TelegramApiRequestException(String message, ApiResponse response)
-
-
Method Detail
-
getApiResponse
public String getApiResponse()
-
getErrorCode
public Integer getErrorCode()
-
getParameters
public ResponseParameters getParameters()
-
getMessage
public String getMessage()
More detailed error description.- Overrides:
getMessage
in classThrowable
- Returns:
- assembled response code and reason
-
-