Package com.restfb.exception
Class ExceptionInformation
- java.lang.Object
-
- com.restfb.exception.ExceptionInformation
-
public class ExceptionInformation extends Object
immutable container to transfer all data used to create the correct facebook exception
-
-
Constructor Summary
Constructors Constructor Description ExceptionInformation(Integer errorCode, Integer errorSubcode, Integer httpStatusCode, String type, String message, String userTitle, String userMessage, Boolean isTransient, JsonObject rawError)
extended constructor to build a set of information used by the exception generatorExceptionInformation(Integer errorCode, Integer httpStatusCode, String message, JsonObject rawError)
basic constructor to build a set of information used by the exception generator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getErrorCode()
Integer
getErrorSubcode()
Integer
getHttpStatusCode()
Boolean
getIsTransient()
String
getMessage()
JsonObject
getRawError()
String
getType()
String
getUserMessage()
String
getUserTitle()
-
-
-
Constructor Detail
-
ExceptionInformation
public ExceptionInformation(Integer errorCode, Integer httpStatusCode, String message, JsonObject rawError)
basic constructor to build a set of information used by the exception generator- Parameters:
errorCode
- Old REST API exception error code field, e.g. 190.httpStatusCode
- The HTTP status code returned by the server, e.g. 500.message
- Graph or Old REST API message field, e.g. "Invalid access token signature."rawError
- raw error message as JSON
-
ExceptionInformation
public ExceptionInformation(Integer errorCode, Integer errorSubcode, Integer httpStatusCode, String type, String message, String userTitle, String userMessage, Boolean isTransient, JsonObject rawError)
extended constructor to build a set of information used by the exception generator- Parameters:
errorCode
- Old REST API exception error code field, e.g. 190.errorSubcode
- Old REST API exception error subcode field, e.g. 459.httpStatusCode
- The HTTP status code returned by the server, e.g. 500.type
- Graph API exception type field, e.g. "OAuthException".message
- Graph or Old REST API message field, e.g. "Invalid access token signature."userTitle
- Graph API error_user_title field.userMessage
- Graph API error_user_message field.rawError
- raw error message as JSON
-
-
Method Detail
-
getErrorCode
public Integer getErrorCode()
-
getErrorSubcode
public Integer getErrorSubcode()
-
getHttpStatusCode
public Integer getHttpStatusCode()
-
getMessage
public String getMessage()
-
getUserTitle
public String getUserTitle()
-
getUserMessage
public String getUserMessage()
-
getIsTransient
public Boolean getIsTransient()
-
getRawError
public JsonObject getRawError()
-
-