This commit is contained in:
Rinjae
2025-09-05 18:57:45 +09:00
commit aacc1a389e
1229 changed files with 167963 additions and 0 deletions
@@ -0,0 +1,63 @@
package com.eactive.eai.adapter.http;
import org.apache.commons.lang3.StringUtils;
public class HttpStatusException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
private int status = 200;
private String code;
/**
* 1. 기능 : Default Constructor
* 2. 처리 개요 : Default Constructor
* 3. 주의사항
*
**/
public HttpStatusException() {
super("HttpStatusException is occured.");
}
/**
* 1. 기능 : Exception message를 초기화하는 Constructor
* 2. 처리 개요 : Exception message를 초기화하는 Constructor
* -
* 3. 주의사항
*
* @param msg Exception message
**/
public HttpStatusException(String msg) {
super(msg);
}
public HttpStatusException(String msg, int status) {
super(msg);
this.status = status;
}
public HttpStatusException(String msg, String code, int status) {
super(msg);
this.setCode(code);
this.status = status;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getCode() {
if (StringUtils.isBlank(code)) {
return String.format("Http Status: %d", status);
} else {
return code;
}
}
public void setCode(String code) {
this.code = code;
}
}