mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-16 15:50:19 +00:00
49 lines
1.2 KiB
Java
49 lines
1.2 KiB
Java
package org.kohsuke.github;
|
|
|
|
import java.io.FileNotFoundException;
|
|
import java.net.HttpURLConnection;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import javax.annotation.CheckForNull;
|
|
|
|
/**
|
|
* Request/responce contains useful metadata. Custom exception allows store info for next diagnostics.
|
|
*
|
|
* @author Kanstantsin Shautsou
|
|
*/
|
|
public class GHFileNotFoundException extends FileNotFoundException {
|
|
protected Map<String, List<String>> responseHeaderFields;
|
|
|
|
/**
|
|
* Instantiates a new Gh file not found exception.
|
|
*/
|
|
public GHFileNotFoundException() {
|
|
}
|
|
|
|
/**
|
|
* Instantiates a new Gh file not found exception.
|
|
*
|
|
* @param s
|
|
* the s
|
|
*/
|
|
public GHFileNotFoundException(String s) {
|
|
super(s);
|
|
}
|
|
|
|
/**
|
|
* Gets response header fields.
|
|
*
|
|
* @return the response header fields
|
|
*/
|
|
@CheckForNull
|
|
public Map<String, List<String>> getResponseHeaderFields() {
|
|
return responseHeaderFields;
|
|
}
|
|
|
|
GHFileNotFoundException withResponseHeaderFields(HttpURLConnection urlConnection) {
|
|
this.responseHeaderFields = urlConnection.getHeaderFields();
|
|
return this;
|
|
}
|
|
}
|