Code example for InvocationTargetException

Methods: getTargetException

0
public abstract class ReflectiveCallable { 
    public Object run() throws Throwable {
        try { 
            return runReflectiveCall(); 
        } catch (InvocationTargetException e) {
            throw e.getTargetException();
        } 
    } 
 
    protected abstract Object runReflectiveCall() throws Throwable;
}