FreeHEP API
Version v1.2

org.freehep.util
Class NestedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.freehep.util.NestedException
All Implemented Interfaces:
HasNestedException, Serializable

public class NestedException
extends Exception
implements HasNestedException

An exception with an embedded (nested) exception.

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

Constructor Summary
NestedException()
          Create a nested exception
NestedException(String message)
          Create a nested exception
NestedException(String message, Throwable detail)
          Create a nested exception
NestedException(Throwable detail)
          Create a nested exception
 
Method Summary
static String formatNestedException(HasNestedException t)
          A static method for formating the text of any exception which implements HasNestedException
 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

NestedException

public NestedException()
Create a nested exception


NestedException

public NestedException(String message)
Create a nested exception

Parameters:
message - The message associated with the exception

NestedException

public NestedException(Throwable detail)
Create a nested exception

Parameters:
detail - The exception nested inside this exception

NestedException

public NestedException(String message,
                       Throwable detail)
Create a nested exception

Parameters:
message - The message associated with the exception
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

formatNestedException

public static String formatNestedException(HasNestedException t)
A static method for formating the text of any exception which implements HasNestedException


FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.