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

com.avos.avoscloud.AVExceptionHolder Maven / Gradle / Ivy

package com.avos.avoscloud;

/**
 * Created with IntelliJ IDEA. User: dennis ([email protected]) Date: 13-7-22 Time: 上午11:37
 */
public final class AVExceptionHolder {

  private static final ThreadLocal local = new ThreadLocal() {
    @Override
    protected AVException initialValue() {
      return null;
    }
  };

  public final static void add(AVException e) {
    local.set(e);
  }

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

  public final static AVException remove() {
    AVException e = local.get();
    local.remove();
    return e;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy