加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090315133619/http://developer.android.com:80/reference/java/lang/reflect/InvocationTargetException.html
public class

InvocationTargetException

extends Exception
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.reflect.InvocationTargetException

Class Overview

This class provides a wrapper for an exception thrown by a Method or Constructor invocation.

Summary

Public Constructors
InvocationTargetException(Throwable exception)
Constructs a new instance of this class with its walkback and target exception filled in.
InvocationTargetException(Throwable exception, String detailMessage)
Constructs a new instance of this class with its walkback, target exception and message filled in.
Protected Constructors
InvocationTargetException()
Constructs a new instance of this class with its walkback filled in.
Public Methods
Throwable getCause()
Returns the cause of this Throwable, or null if there is no cause.
Throwable getTargetException()
Returns the exception which caused the receiver to be thrown.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public InvocationTargetException (Throwable exception)

Constructs a new instance of this class with its walkback and target exception filled in.

Parameters
exception Throwable The exception which occurred while running the Method or Constructor.

public InvocationTargetException (Throwable exception, String detailMessage)

Constructs a new instance of this class with its walkback, target exception and message filled in.

Parameters
exception Throwable The exception which occurred while running the Method or Constructor.
detailMessage String The detail message for the exception.

Protected Constructors

protected InvocationTargetException ()

Constructs a new instance of this class with its walkback filled in.

Public Methods

public Throwable getCause ()

Returns the cause of this Throwable, or null if there is no cause.

Returns
  • Throwable The receiver's cause.

public Throwable getTargetException ()

Returns the exception which caused the receiver to be thrown.