All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hl7.fhir.utilities.http.HTTPResultException Maven / Gradle / Ivy

There is a newer version: 6.4.1
Show newest version
package org.hl7.fhir.utilities.http;

public class HTTPResultException extends Exception{
  public final int httpCode;

  public final String message;

  public final String url;
  public final String logPath;

  public HTTPResultException(int httpCode, String message, String url, String logPath) {
    this.httpCode = httpCode;
    this.message = message;
    this.url = url;
    this.logPath = logPath;
  }

  public String getMessage() {
    return "Invalid HTTP response "+httpCode+" from "+url+" ("+message+") (" + (
      logPath != null ? "Response in " + logPath : "No response content")
    + ")";
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy