Class InvocationTargetException

    • Constructor Detail

      • InvocationTargetException

        protected InvocationTargetException()
        Constructs a new InvocationTargetException instance with a null cause / target exception.
      • InvocationTargetException

        public InvocationTargetException​(Throwable exception)
        Constructs a new InvocationTargetException instance with its cause / target exception filled in.
        Parameters:
        exception - the exception which occurred while running the Method or Constructor
      • InvocationTargetException

        public InvocationTargetException​(Throwable exception,
                                         String detailMessage)
        Constructs a new InvocationTargetException instance with its cause / target exception and message filled in.
        Parameters:
        detailMessage - the detail message for the exception
        exception - the exception which occurred while running the Method or Constructor
    • Method Detail

      • getTargetException

        public Throwable getTargetException()
        Returns the target exception, which may be null.
        Returns:
        the target exception
      • getCause

        public Throwable getCause()
        Returns the cause of this exception, which may be null.
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this exception