Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 10. java.lang and Subpackages > UndeclaredThrowableException

UndeclaredThrowableException

Thrown by a method of a Proxy object if the invoke( ) method of the proxy's InvocationHandler throws a checked exception not declared by the original method. This class serves as an unchecked exception wrapper around the checked exception. Use getUndeclaredThrowable( ) to obtain the checked exception thrown by invoke( ). In Java 1.4 and later, all exceptions can be "chained" in this way, and getUndeclaredThrowable( ) is superseded by the more general getCause( ) method.

Figure 10-103. java.lang.reflect.UndeclaredThrowableException


public class UndeclaredThrowableException extends RuntimeException {
// Public Constructors
     public UndeclaredThrowableException(Throwable undeclaredThrowable);  
     public UndeclaredThrowableException(Throwable undeclaredThrowable, String s);  
// Public Instance Methods
     public Throwable getUndeclaredThrowable( );  
// Public Methods Overriding Throwable
                  1.4  public Throwable getCause( );  
}

					  


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial