package com.ils.oms.result; /** * * @describe 全局异常处理类 * @author chenjf * @since 2023/8/8 */ public class GlobalException extends Exception{ private String code; private String message; public GlobalException() { super(); } public GlobalException(String message) { super(message); this.message = message; } public GlobalException(String code, String message) { super(code + ": " + message); this.code = code; this.message = message; } public GlobalException(String message, Throwable throwable) { super(message, throwable); this.message = message; } public GlobalException(Throwable throwable) { super(throwable); } public String getCode() { return code; } @Override public String getMessage() { return message; } @Override public String toString() { return code + ": " + message; } }