Files
sake/src/main/java/com/wb/domainserver/exception/WnbtRestException.java
2025-10-29 17:08:05 +09:00

40 lines
949 B
Java

package com.wb.domainserver.exception;
import com.wb.domainserver.exception.code.ErrorCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class WnbtRestException extends RuntimeException {
private String code;
private ErrorCode errCode;
public WnbtRestException(String message) {
super(message);
}
public WnbtRestException(String code, String message) {
super(message);
this.code = code;
}
public WnbtRestException(ErrorCode errCode) {
super(errCode.getMessage());
this.code = String.valueOf(errCode.getStatus());
this.errCode = errCode;
}
public WnbtRestException(ErrorCode errCode, String customMessage) {
super(customMessage);
this.code = String.valueOf(errCode.getStatus());
this.errCode = errCode;
}
public WnbtRestException(String message, Throwable cause){
super(message, cause);
}
}