package com.loan.system.exception; import com.loan.system.domain.enums.ExceptionEnum; import java.io.IOException; /** * @author EdwinXu * @date 2020/9/26 - 21:38 * @Description */ public class FileException extends IOException { private static final long serialVersionUID = 716346130825379248L; private Integer code; public FileException(Integer code, String msg){ super(msg); this.code = code; } public FileException(ExceptionEnum exceptionEnum) { super(exceptionEnum.getMsg()); this.code = exceptionEnum.getCode(); } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } @Override public String toString() { return "FileException{" + "code=" + code + " msg = " + this.getMessage() + '}'; } }