facebook4j
Class FacebookException
java.lang.Object
java.lang.Throwable
java.lang.Exception
facebook4j.FacebookException
- All Implemented Interfaces:
- java.io.Serializable
public class FacebookException
- extends java.lang.Exception
An exception class that will be thrown when Facebook Graph API calls are failed.
In case the Facebook server returned HTTP error code, you can get the HTTP status code using getStatusCode() method.
- Author:
- Ryuji Yamashita - roundrop at gmail.com
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
statusCode
private int statusCode
response
private facebook4j.internal.http.HttpResponse response
errorType
private java.lang.String errorType
errorMessage
private java.lang.String errorMessage
errorCode
private int errorCode
errorSubcode
private int errorSubcode
FacebookException
public FacebookException(java.lang.String message,
java.lang.Throwable cause)
FacebookException
public FacebookException(java.lang.String message,
facebook4j.internal.http.HttpResponse res)
FacebookException
public FacebookException(java.lang.String message)
FacebookException
public FacebookException(java.lang.Throwable cause)
FacebookException
public FacebookException(java.lang.String message,
java.lang.Throwable cause,
int statusCode)
decode
private void decode(java.lang.String str)
getStatusCode
public int getStatusCode()
getErrorType
public java.lang.String getErrorType()
getErrorMessage
public java.lang.String getErrorMessage()
getErrorCode
public int getErrorCode()
getErrorSubcode
public int getErrorSubcode()
getResponseHeader
public java.lang.String getResponseHeader(java.lang.String name)
isCausedByNetworkIssue
public boolean isCausedByNetworkIssue()
- Tests if the exception is caused by network issue
- Returns:
- if the exception is caused by network issue
resourceNotFound
public boolean resourceNotFound()
- Tests if the exception is caused by non-existing resource
- Returns:
- if the exception is caused by non-existing resource
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Throwable