本文共 563 字,大约阅读时间需要 1 分钟。
package com.imooc.mall.exception;/** * 描述: 统一异常 */public class ImoocMallException extends RuntimeException { private final Integer code; private final String message; public ImoocMallException(Integer code, String message) { this.code = code; this.message = message; } public ImoocMallException(ImoocMallExceptionEnum exceptionEnum) { this(exceptionEnum.getCode(), exceptionEnum.getMsg()); } public Integer getCode() { return code; } @Override public String getMessage() { return message; }}
转载地址:http://edvez.baihongyu.com/