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 HttpResponse response
errorType
private java.lang.String errorType
errorMessage
private java.lang.String errorMessage
errorCode
private int errorCode
FacebookException
public FacebookException(java.lang.String message,
java.lang.Throwable cause)
FacebookException
public FacebookException(java.lang.String message,
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)
getErrorType
public java.lang.String getErrorType()
getErrorMessage
public java.lang.String getErrorMessage()
getErrorCode
public int getErrorCode()
getStatusCode
public int getStatusCode()
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
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Throwable