package com.ots.project.common.exception; import com.ots.common.enums.CodeEnum; import java.text.MessageFormat; public interface BusinessExceptionAssert extends CodeEnum, Assert { @Override default BaseException newException(Object... args) { String msg = MessageFormat.format(this.getMessage(), args); return new BaseException(this, args, msg); } @Override default BaseException newException(Throwable t, Object... args) { String msg = MessageFormat.format(this.getMessage(), args); return new BaseException(this, args, msg, t); } }