com.github.fge.grappa.debugger.common.ThrowingRunnable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grappa-debugger Show documentation
Show all versions of grappa-debugger Show documentation
GUI application to debug grappa parsers
The newest version!
package com.github.fge.grappa.debugger.common;
import com.github.fge.lambdas.ThrownByLambdaException;
@FunctionalInterface
public interface ThrowingRunnable
extends Runnable
{
void doRun()
throws Throwable;
@Override
default void run()
{
try {
doRun();
} catch (Error | RuntimeException e) {
throw e;
} catch (Throwable tooBad) {
throw new ThrownByLambdaException(tooBad);
}
}
}