Save This Page
Home » commons-lang-2.4-src » org.apache.commons » lang » [javadoc | source]
org.apache.commons.lang
public class: UnhandledException [javadoc | source]
java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         java.lang.RuntimeException
            org.apache.commons.lang.exception.NestableRuntimeException
               org.apache.commons.lang.UnhandledException

All Implemented Interfaces:
    Nestable, Serializable

Thrown when it is impossible or undesirable to consume or throw a checked exception.

This exception supplements the standard exception classes by providing a more semantically rich description of the problem.

UnhandledException represents the case where a method has to deal with a checked exception but does not wish to. Instead, the checked exception is rethrown in this unchecked wrapper.

public void foo() {
try {
// do something that throws IOException
} catch (IOException ex) {
// don't want to or can't throw IOException from foo()
throw new UnhandledException(ex);
}
}
Fields inherited from org.apache.commons.lang.exception.NestableRuntimeException:
delegate
Constructor:
 public UnhandledException(Throwable cause) 
    Constructs the exception using a cause.
    Parameters:
    cause - the underlying cause
 public UnhandledException(String message,
    Throwable cause) 
    Constructs the exception using a message and cause.
    Parameters:
    message - the message to use
    cause - the underlying cause
Methods from org.apache.commons.lang.exception.NestableRuntimeException:
getCause,   getMessage,   getMessage,   getMessages,   getThrowable,   getThrowableCount,   getThrowables,   indexOfThrowable,   indexOfThrowable,   printPartialStackTrace,   printStackTrace,   printStackTrace,   printStackTrace
Methods from java.lang.Throwable:
fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait