All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.cshencode.exception.StackTraceSingleException Maven / Gradle / Ivy

There is a newer version: 2.1.2-RELEASE
Show newest version
package io.github.cshencode.exception;

/**
 * 

* - 没有错误栈的 单例异常 *

* * @author css * @since 2022/3/20 */ public class StackTraceSingleException extends RuntimeCustomException { /** * 维护msg信息 */ public final ThreadLocal msgThreadLocal = new ThreadLocal<>(); private final static StackTraceSingleException INSTANCE = new StackTraceSingleException(); private StackTraceSingleException() { super(null, null, true, false); } public static StackTraceSingleException msg(String msg) { INSTANCE.msgThreadLocal.set(msg); return INSTANCE; } @Override public String getMessage() { return msgThreadLocal.get(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy