Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.factual.driver;
 
Represents an Exception that happened while communicating with Factual. Includes information about the request that triggered the problem.

Author(s):
aaron
public class FactualApiException extends RuntimeException {
  private String requestUrl;
  private String requestMethod;
  private HttpResponse response;
  private int statusCode;
  private String statusMessage;
  public FactualApiException(Exception e) {
    super(e);
  }
  public FactualApiException(String msg) {
    super(msg);
  }
    this. = url;
    return this;
  }
  public FactualApiException requestMethod(String method) {
    this. = method;
    return this;
  }
  public FactualApiException response(HttpResponse response) {
    this. = response;
    this. = response.getStatusCode();
    this. = response.getStatusMessage();
    return this;
  }

  

Returns:
the status code.
  public int getStatusCode() {
    return ;
  }

  

Returns:
the status code.
  public String getStatusMessage() {
    return ;
  }

  

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

  

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

  

Deprecated:
remove dependency on api specific to google client api. Use getStatusMessage() and getStatusCode() instead to find information on the response. Access to HttpResponse is unavailable from google-client-api version 1.9.0-beta and later.
Returns:
the full HttpResponse object, representing the problematic response from Factual.
  public HttpResponse getResponse() {
    return ;
  }
New to GrepCode? Check out our FAQ X