Code example for InvocationTargetException

Methods: getCause

0
        } catch (InstantiationException e) {
            throw new IllegalStateException("Error instantiating proxy for annotation. Annotation type: " + annotationType, e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException("Error instantiating proxy for annotation. Annotation type: " + annotationType, e);
        } catch (InvocationTargetException e) {
            throw new IllegalStateException("Error instantiating proxy for annotation. Annotation type: " + annotationType, e.getCause());
        } catch (SecurityException e) {
            throw new IllegalStateException("Error accessing proxy constructor for annotation. Annotation type: " + annotationType, e);
        } catch (NoSuchMethodException e) {
            throw new IllegalStateException("Error accessing proxy constructor for annotation. Annotation type: " + annotationType, e);
        } 
    } 
}