Skip to content

Most visited

Recently visited

navigation
Added in API level 1

UndeclaredThrowableException

public class UndeclaredThrowableException
extends RuntimeException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ java.lang.reflect.UndeclaredThrowableException


This class provides a wrapper for an undeclared, checked exception thrown by an InvocationHandler.

See also:

Summary

Public constructors

UndeclaredThrowableException(Throwable exception)

Constructs a new UndeclaredThrowableException instance with the undeclared, checked exception that occurred.

UndeclaredThrowableException(Throwable exception, String detailMessage)

Constructs a new UndeclaredThrowableException instance with the undeclared, checked exception that occurred and a message.

Public methods

Throwable getCause()

Returns the undeclared, checked exception that occurred, which may be null.

Throwable getUndeclaredThrowable()

Returns the undeclared, checked exception that occurred, which may be null.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

UndeclaredThrowableException

Added in API level 1
UndeclaredThrowableException (Throwable exception)

Constructs a new UndeclaredThrowableException instance with the undeclared, checked exception that occurred.

Parameters
exception Throwable: the undeclared, checked exception that occurred

UndeclaredThrowableException

Added in API level 1
UndeclaredThrowableException (Throwable exception, 
                String detailMessage)

Constructs a new UndeclaredThrowableException instance with the undeclared, checked exception that occurred and a message.

Parameters
exception Throwable: the undeclared, checked exception that occurred
detailMessage String: the detail message for the exception

Public methods

getCause

Added in API level 1
Throwable getCause ()

Returns the undeclared, checked exception that occurred, which may be null.

Returns
Throwable the undeclared, checked exception that occurred

getUndeclaredThrowable

Added in API level 1
Throwable getUndeclaredThrowable ()

Returns the undeclared, checked exception that occurred, which may be null.

Returns
Throwable the undeclared, checked exception that occurred
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.