package coffee.liz.ecs.utils; public final class FunctionUtils { /** * Runs the provided action and wraps failures into a {@link RuntimeException}. * * @param run * action to execute */ public static void wrapCheckedException(final ThrowableRunnable run) { try { run.run(); } catch (final Throwable e) { throw new RuntimeException(e); } } @FunctionalInterface public interface ThrowableRunnable { /** * Run. */ void run() throws E; } private FunctionUtils() { } }