1 package com.irtimaled.bbor.server;
3 import com.irtimaled.bbor.common.TypeHelper;
5 import java.util.function.Consumer;
7 public interface ThrowableConsumer<T> extends Consumer<T> {
9 default void accept(final T elem) {
12 } catch (final Throwable t) {
13 throw TypeHelper.as(t, RuntimeException.class, () -> new RuntimeException(t));
17 void acceptThrows(T elem) throws Throwable;