Code example for InvocationTargetException

Methods: getTargetException

0
	public void run() { 
		try { 
			invoke();
		} 
		catch (InvocationTargetException ex) {
			logger.error(getInvocationFailureMessage(), ex.getTargetException());
			// Do not throw exception, else the main loop of the scheduler might stop! 
		} 
		catch (Throwable ex) {
			logger.error(getInvocationFailureMessage(), ex);
			// Do not throw exception, else the main loop of the scheduler might stop! 
		} 
	} 
 
	/** 
	 * Build a message for an invocation failure exception. 
	 * @return the error message, including the target method name etc 
	 */ 
	protected String getInvocationFailureMessage() {
		return "Invocation of method '" + getTargetMethod() +