code: public static <T> boolean addThrowable(AtomicReferenceFieldUpdater<T, Throwable> field,
  			T instance,
  			Throwable exception) {
  		for (; ; ) {
  			Throwable current = field.get(instance);
  
  			if (current == TERMINATED) {
  				return false;
  			}
  
  			if (current instanceof CompositeException) {
  				//this is ok, composite exceptions are never singletons
  				current.addSuppressed(exception);
  				return true;
  			}
  
  			Throwable update;
  			if (current == null) {
  				update = exception;
  			} else {
  				update = multiple(current, exception);
  			}
  
  			if (field.compareAndSet(instance, current, update)) {
  				return true;
  			}
  		}
  	}
docs: Update an empty atomic reference with the given exception, or combine further added
  exceptions together as suppressed exceptions under a root Throwable with
  the {@code "Multiple exceptions"} message, if the atomic reference already holds
  one. This is short-circuited if the reference contains {@link #TERMINATED}.
  
  @param <T> the parent instance type
  @param field the target field updater
  @param instance the parent instance for the field
  @param exception the Throwable to add.
  
  @return true if added, false if the field contained the {@link #TERMINATED}
  instance.
  @see #unwrapMultiple(Throwable)