FreeHEP API
Version v1.2

org.freehep.util
Class NestedRuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.freehep.util.NestedRuntimeException
All Implemented Interfaces:
HasNestedException, Serializable
Direct Known Subclasses:
Application.InitializationException

public class NestedRuntimeException
extends RuntimeException
implements HasNestedException

A runtime exception with an embedded (nested) exception. The NestedRuntimeException is particluarly useful for converting a checked exception to a non-checked (runtime) exception, without loosing the information associated with the checked exception.

Version:
$Id: NestedRuntimeException.java,v 1.1 2001/02/03 02:41:35 tonyj Exp $
Author:
Tony Johnson
See Also:
NestedException, HasNestedException, Serialized Form

Constructor Summary
NestedRuntimeException()
          Create an exception with no message and no nested exception.
NestedRuntimeException(String message)
          Create an exception with no nested exception
NestedRuntimeException(String message, Throwable detail)
          Create a remote exception with the specified message, and the nested exception specified.
NestedRuntimeException(Throwable detail)
          Create a nested exception with the specified nested exception
 
Method Summary
 String getMessage()
          Get the message text, including the message text if the nested exception
 Throwable getNestedException()
          Get the exception nested inside
 String getSimpleMessage()
          Get the message text, without the message text of the nested exception
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedRuntimeException

public NestedRuntimeException()
Create an exception with no message and no nested exception.


NestedRuntimeException

public NestedRuntimeException(String message)
Create an exception with no nested exception


NestedRuntimeException

public NestedRuntimeException(Throwable detail)
Create a nested exception with the specified nested exception

Parameters:
detail - The nested exception

NestedRuntimeException

public NestedRuntimeException(String message,
                              Throwable detail)
Create a remote exception with the specified message, and the nested exception specified.

Parameters:
detail - The nested exception
Method Detail

getNestedException

public Throwable getNestedException()
Description copied from interface: HasNestedException
Get the exception nested inside

Specified by:
getNestedException in interface HasNestedException
Returns:
The nested exception

getMessage

public String getMessage()
Description copied from interface: HasNestedException
Get the message text, including the message text if the nested exception

Specified by:
getMessage in interface HasNestedException
Overrides:
getMessage in class Throwable
Returns:
The message corresponding to this exception

getSimpleMessage

public String getSimpleMessage()
Description copied from interface: HasNestedException
Get the message text, without the message text of the nested exception

Specified by:
getSimpleMessage in interface HasNestedException
Returns:
The message corresponding to this exception

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.