package com.gk.hotwork.Domain.Exception; import com.gk.hotwork.Domain.Enum.ResultCodes; public class BusinessException extends RuntimeException{ private String code; private String error; public BusinessException(String message) { super(message); } public BusinessException(ResultCodes code) { super(code.getDesc()); this.code = code.getCode(); this.error = code.getDesc(); } public BusinessException(String code, String error) { super(error); this.code = code; this.error = error; } public BusinessException(E e, String error) { super(error); this.code = e.getCode(); this.error = error; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getError() { return error; } public void setError(String error) { this.error = error; } }