to top
Android APIs
public class

UndeclaredThrowableException

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

Class Overview

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

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.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public UndeclaredThrowableException (Throwable exception)

Since: API Level 1

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

Parameters
exception the undeclared, checked exception that occurred

public UndeclaredThrowableException (Throwable exception, String detailMessage)

Since: API Level 1

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

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

Public Methods

public Throwable getCause ()

Since: API Level 1

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

Returns
  • the undeclared, checked exception that occurred

public Throwable getUndeclaredThrowable ()

Since: API Level 1

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

Returns
  • the undeclared, checked exception that occurred