mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-14 08:21:22 +00:00
62 lines
1.5 KiB
Java
62 lines
1.5 KiB
Java
package org.kohsuke.github;
|
|
|
|
import java.io.FileNotFoundException;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import javax.annotation.CheckForNull;
|
|
import javax.annotation.Nonnull;
|
|
|
|
/**
|
|
* 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 message
|
|
* the message
|
|
*/
|
|
public GHFileNotFoundException(String message) {
|
|
super(message);
|
|
}
|
|
|
|
/**
|
|
* Instantiates a new Gh file not found exception.
|
|
*
|
|
* @param message
|
|
* the message
|
|
* @param cause
|
|
* the cause
|
|
*/
|
|
public GHFileNotFoundException(String message, Throwable cause) {
|
|
super(message);
|
|
this.initCause(cause);
|
|
}
|
|
|
|
/**
|
|
* Gets response header fields.
|
|
*
|
|
* @return the response header fields
|
|
*/
|
|
@CheckForNull
|
|
public Map<String, List<String>> getResponseHeaderFields() {
|
|
return responseHeaderFields;
|
|
}
|
|
|
|
GHFileNotFoundException withResponseHeaderFields(@Nonnull Map<String, List<String>> headerFields) {
|
|
this.responseHeaderFields = headerFields;
|
|
return this;
|
|
}
|
|
}
|