Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.lang
Class UnhandledException

    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, java.io.Serializable

public class UnhandledException
extends NestableRuntimeException

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);
       }
     }

Since:
  2.0
Version:
  $Id: UnhandledException.java 437554 2006-08-28 06:21:41Z bayard $
Author:
  Matthew Hawthorne
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.commons.lang.exception.NestableRuntimeException
`delegate`

Constructor Summary
`UnhandledException(java.lang.String message, java.lang.Throwable cause)` Constructs the exception using a message and cause.
`UnhandledException(java.lang.Throwable cause)` Constructs the exception using a cause.

Methods inherited from class org.apache.commons.lang.exception.NestableRuntimeException
`getCause, getMessage, getMessage, getMessages, getThrowable, getThrowableCount, getThrowables, indexOfThrowable, indexOfThrowable, printPartialStackTrace, printStackTrace, printStackTrace, printStackTrace`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### UnhandledException

    public UnhandledException(java.lang.Throwable cause)

  Constructs the exception using a cause.

Parameters:
  `cause` - the underlying cause

### UnhandledException

    public UnhandledException(java.lang.String message,
                              java.lang.Throwable cause)

  Constructs the exception using a message and cause.

Parameters:
  `message` - the message to use
  `cause` - the underlying cause

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.