List of usage examples for com.google.common.eventbus SubscriberExceptionHandler handleException
void handleException(Throwable exception, SubscriberExceptionContext context);
From source file:net.minecraftforge.fml.common.eventhandler.FMLThrowingEventBus.java
public FMLThrowingEventBus(final SubscriberExceptionHandler exceptionHandler) { super((exception, context) -> { try {//from w w w. ja va 2 s . c o m exceptionHandler.handleException(exception, context); } catch (final Throwable t) { // this is a hack to break out of the catch statement in EventBus.handleSubscriberException throw new RuntimeException() { @Override public String toString() { throw t; } }; } }); }