Code example for InvocationTargetException

Methods: getTargetException

0
		try 
		{ 
			System.out.println("before method " + method.getName());
			result = method.invoke(this.obj, args);			
		} catch (InvocationTargetException e) {
			throw e.getTargetException();
		} catch (Exception e) {
			throw new RuntimeException("Unexpected invocation exeption:" + e.getMessage());
		} finally{ 
			System.out.println("after method " + method.getName());
		} 
		 
		return result;
	} 
 
}