Code example for InvocationTargetException

Methods: getCause

0
					method.invoke(instance, source, args);
				} else { 
					method.invoke(instance, args, source);
				} 
			} catch (InvocationTargetException e) {
				Throwable cause = e.getCause();
				if (cause instanceof CommandException) {
					throw (CommandException) cause;
				} 
 
				throw new WrappedCommandException(e);
			} catch (Exception e) {
				throw new WrappedCommandException(e);
			} 
		} 
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java