![JAR search and dependency download from the Maven repository](/logo.png)
org.junit.internal.runners.model.ReflectiveCallable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of th-junit4 Show documentation
Show all versions of th-junit4 Show documentation
JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.
The newest version!
package org.junit.internal.runners.model;
import java.lang.reflect.InvocationTargetException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* When invoked, throws the exception from the reflected method, rather than
* wrapping it in an InvocationTargetException.
*/
public abstract class ReflectiveCallable {
private static final Logger LOG = LoggerFactory.getLogger(ReflectiveCallable.class);
public Object run() throws Throwable {
try {
return runReflectiveCall();
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
LOG.error("{}", e.getCause(), t);
throw t;
}
}
protected abstract Object runReflectiveCall() throws Throwable;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy