Spaces:
Build error
Build error
File size: 471 Bytes
d46f4a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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;
}
}
} |