![JAR search and dependency download from the Maven repository](/logo.png)
net.diversionmc.error.TryR Maven / Gradle / Ivy
package net.diversionmc.error;
@FunctionalInterface
public interface TryR extends Runnable {
void tryRun() throws E;
@SuppressWarnings("OverlyBroadCatchBlock")
default void run() {
try {
tryRun();
} catch (Exception e) {
throw new ResultException(e);
}
}
static TryR of(Runnable f) {
return f::run;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy