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

com.javabaas.javasdk.JBExceptionHolder Maven / Gradle / Ivy

package com.javabaas.javasdk;

/**
 * Created by zangyilin on 2017/9/4.
 */
public final class JBExceptionHolder {
    private static final ThreadLocal LOCAL = new ThreadLocal<>();

    public final static void add(JBException e) {
        LOCAL.set(e);
    }

    public final static boolean exists() {
        return LOCAL.get() != null;
    }

    public final static JBException remove() {
        JBException e = LOCAL.get();
        LOCAL.remove();
        return e;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy