Code example for InvocationTargetException

Methods: getTargetException

0
        try { 
            return doInvoke(ctx, args, ctx.getInput());
        } catch (OperationException e) {
            throw e;
        } catch (InvocationTargetException e) {
            Throwable t = e.getTargetException();
            if (t instanceof OperationException) {
                throw (OperationException)t;
            } else { 
                throw new OperationException("Failed to invoke operation " 
                    + op.getId(), t);
            } 
        } catch (Throwable t) {
            throw new OperationException("Failed to invoke operation " 
                    + op.getId(), t);
        } 
    } 
 
}