nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/AtomicThrowable.java
public void setIfFirst(Throwable t) {
        try {
            lock.writeLock().lock();

            if (this.t == null)
                this.t = t;
        } finally {
            lock.writeLock().unlock();
        }
    }
public void setIfFirst(Throwable t) {
        try {
            lock.writeLock().lock();

            if (this.t == null)
                this.t = t;
        } finally {
            lock.writeLock().unlock();
        }
    }
This method updates state only if it wasn't set before

@param t