Code example for InvocationTargetException

Methods: getClassgetMessage

0
    private Object invoke( Method method, Object object, Object[] args) throws Throwable { 
        Object result = null; 
        try {  
            result = method.invoke(object, args);
        } catch( InvocationTargetException ite ) { 
           logger.warn(method.getName() + " threw " + ite.getClass().getSimpleName() + ": " + ite.getMessage());
           throw ite;
        } 
        return result; 
    } 
} 
Experience pair programming with AI  Get Codota for Java