package com.wb.domainserver.exception; import com.wb.domainserver.exception.code.PosCode; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; @Getter @Builder @AllArgsConstructor public class WnbtPosRestException extends RuntimeException{ /*에러여부*/ private String status; /*메시지*/ private String msg; private Object data; /*에러메시지 영문*/ private String err; public WnbtPosRestException(PosCode posCode) { super(posCode.getMsg()); this.status = posCode.getStatus(); this.msg = posCode.getMsg(); this.err = posCode.getErr(); } public WnbtPosRestException(PosCode posCode, String customMsg, String customErr) { super(customMsg+posCode.getMsg()); this.status = posCode.getStatus(); this.msg = customMsg + posCode.getMsg(); this.err = posCode.getErr() + customErr; } public WnbtPosRestException(PosCode posCode, Object data) { super(posCode.getMsg()); this.status = posCode.getStatus(); this.data = data; this.err = posCode.getErr(); } public WnbtPosRestException(PosCode posCode, String customMsg, String customErr, Object data) { super(customMsg+posCode.getMsg()); this.status = posCode.getStatus(); this.msg = customMsg + posCode.getMsg(); this.data = data; this.err = posCode.getErr() + customErr; } }