Code example for InvocationTargetException

Methods: getTargetException

0
                } catch (IllegalAccessException e) {
                    throw new IllegalAccessError(e.getMessage());
                } 
            } 
        } catch (InvocationTargetException e) {
            Throwable t = e.getTargetException();
            if(t instanceof RuntimeException)
                throw (RuntimeException)t;
            if(t instanceof Error)
                throw (Error)t;
            if(t instanceof CmdLineException)
                throw (CmdLineException)t;
 
            // otherwise wrap 
            if(t!=null)
                throw new CmdLineException(parser, t);
            else 
                throw new CmdLineException(parser, e);
        } 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java