facebook4j
Class FacebookException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by facebook4j.FacebookException
All Implemented Interfaces:
Serializable

public class FacebookException
extends 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

Constructor Summary
FacebookException(String message)
           
FacebookException(String message, facebook4j.internal.http.HttpResponse res)
           
FacebookException(String message, Throwable cause)
           
FacebookException(String message, Throwable cause, int statusCode)
           
FacebookException(Throwable cause)
           
 
Method Summary
 boolean equals(Object o)
           
 int getErrorCode()
           
 String getErrorMessage()
           
 int getErrorSubcode()
           
 String getErrorType()
           
 String getMessage()
           
 String getResponseHeader(String name)
           
 int getStatusCode()
           
 int hashCode()
           
 boolean isCausedByNetworkIssue()
          Tests if the exception is caused by network issue
 boolean resourceNotFound()
          Tests if the exception is caused by non-existing resource
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FacebookException

public FacebookException(String message,
                         Throwable cause)

FacebookException

public FacebookException(String message,
                         facebook4j.internal.http.HttpResponse res)

FacebookException

public FacebookException(String message)

FacebookException

public FacebookException(Throwable cause)

FacebookException

public FacebookException(String message,
                         Throwable cause,
                         int statusCode)
Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

getStatusCode

public int getStatusCode()

getErrorType

public String getErrorType()

getErrorMessage

public String getErrorMessage()

getErrorCode

public int getErrorCode()

getErrorSubcode

public int getErrorSubcode()

getResponseHeader

public String getResponseHeader(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(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Throwable


Copyright © 2019. All rights reserved.