eagler-1-12-4 / src /game /java /net /minecraft /util /ExceptionCollector.java
soiz1's picture
Upload folder using huggingface_hub
d46f4a3 verified
package net.minecraft.util;
import javax.annotation.Nullable;
public class ExceptionCollector<T extends Throwable> {
@Nullable
private T result;
public void add(T p_13654_) {
if (this.result == null) {
this.result = p_13654_;
} else {
this.result.addSuppressed(p_13654_);
}
}
public void throwIfPresent() throws T {
if (this.result != null) {
throw this.result;
}
}
}