class I18nSupportException extends TraceSourceException {

    /**
     * 消息code,在message.properties文件中定义的key
     */
    private String i18nCode;

    /**
     * 消息参数
     */
    private Object[] args;

    protected I18nSupportException() {

    }

    public I18nSupportException(String code, Object... args) {
        super(code);
        this.i18nCode = code;
        this.args = args;
    }

    public I18nSupportException(String code, Throwable cause, Object... args) {
        super(code, cause);
        this.args = args;
        this.i18nCode = code;
    }

    public String getOriginalMessage() {
        return super.getMessage() != null ? super.getMessage() : getI18nCode();
    }

    @Override
    public String getMessage() {
        return super.getMessage() != null ? super.getMessage() : getLocalizedMessage();
    }

    @Override
    public final String getLocalizedMessage() {
        return getLocalizedMessage(LocaleUtils.current());
    }

    public String getLocalizedMessage(Locale locale) {
        return LocaleUtils.resolveMessage(i18nCode, locale, getOriginalMessage(), args);
    }

    public final Mono<String> getLocalizedMessageReactive() {
        return LocaleUtils
                .currentReactive()
                .map(this::getLocalizedMessage);
    }

    public static String tryGetLocalizedMessage(Throwable error, Locale locale) {<FILL_FUNCTION_BODY>}

    public static String tryGetLocalizedMessage(Throwable error) {
        return tryGetLocalizedMessage(error, LocaleUtils.current());
    }

    public static Mono<String> tryGetLocalizedMessageReactive(Throwable error) {
        return LocaleUtils
                .currentReactive()
                .map(locale -> tryGetLocalizedMessage(error, locale));
    }
}

        if (error instanceof I18nSupportException) {
            return ((I18nSupportException) error).getLocalizedMessage(locale);
        }
        String msg = error.getMessage();

        if (!StringUtils.hasText(msg)) {
            msg = "error." + error.getClass().getSimpleName();
        }
        if (msg.contains(".")) {
            return LocaleUtils.resolveMessage(msg, locale, msg);
        }
        return msg;
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) ,public static Context deepTraceContext() ,public java.lang.String getOperation() ,public java.lang.Object getSource() ,public static Function<java.lang.Throwable,Mono<T>> transfer(java.lang.Object) ,public static Function<java.lang.Throwable,Mono<T>> transfer(java.lang.String, java.lang.Object) ,public static java.lang.String tryGetOperation(java.lang.Throwable) ,public static java.lang.String tryGetOperationLocalized(java.lang.Throwable, java.util.Locale) ,public static Mono<java.lang.String> tryGetOperationLocalizedReactive(java.lang.Throwable) ,public static java.lang.Object tryGetSource(java.lang.Throwable) ,public org.hswebframework.web.exception.TraceSourceException withSource(java.lang.Object) ,public org.hswebframework.web.exception.TraceSourceException withSource(java.lang.String, java.lang.Object) <variables>private static final Context deepTraceContext,private static final java.lang.String deepTraceKey,private java.lang.String operation,private java.lang.Object source