dnet-applications/libs/dnet-exporter-model/src/main/java/eu/dnetlib/openaire/exporter/exceptions/DsmApiException.java

37 lines
679 B
Java
Raw Normal View History

package eu.dnetlib.openaire.exporter.exceptions;
2023-04-03 12:22:22 +02:00
public class DsmApiException extends Exception {
private static final long serialVersionUID = -8173126561260106405L;
private int code;
2023-04-03 12:22:22 +02:00
public DsmApiException(final int code, final String msg) {
super(msg);
this.code = code;
}
2023-04-03 12:22:22 +02:00
public DsmApiException(final int code, final Throwable e) {
super(e);
this.code = code;
}
2023-04-03 12:22:22 +02:00
public DsmApiException(final int code, final String msg, final Throwable e) {
super(msg, e);
this.code = code;
}
2023-04-03 12:22:22 +02:00
public DsmApiException(final String msg) {
this(500, msg);
}
public int getCode() {
return code;
}
public void setCode(final int code) {
this.code = code;
}
}