com.factual.driver
Class FactualApiException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.factual.driver.FactualApiException
All Implemented Interfaces:
Serializable

public class FactualApiException
extends RuntimeException

Represents an Exception that happened while communicating with Factual. Includes information about the request that triggered the problem.

Author:
aaron
See Also:
Serialized Form

Constructor Summary
FactualApiException(Exception e)
           
FactualApiException(String msg)
           
 
Method Summary
 String getRequestMethod()
           
 String getRequestUrl()
           
 com.google.api.client.http.HttpResponse getResponse()
           
 FactualApiException requestMethod(String method)
           
 FactualApiException requestUrl(String url)
           
 FactualApiException response(com.google.api.client.http.HttpResponse response)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactualApiException

public FactualApiException(Exception e)

FactualApiException

public FactualApiException(String msg)
Method Detail

requestUrl

public FactualApiException requestUrl(String url)

requestMethod

public FactualApiException requestMethod(String method)

response

public FactualApiException response(com.google.api.client.http.HttpResponse response)

getRequestUrl

public String getRequestUrl()
Returns:
the URL used to make the offending request to Factual.

getRequestMethod

public String getRequestMethod()
Returns:
the HTTP request method used to make the offending request to Factual.

getResponse

public com.google.api.client.http.HttpResponse getResponse()
Returns:
the full HttpResponse object, representing the problematic response from Factual.


Copyright © 2012. All Rights Reserved.