Arch4J 1.1

org.arch4j.core
Class BaseRuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.arch4j.core.BaseRuntimeException
All Implemented Interfaces:
BaseException, Serializable
Direct Known Subclasses:
EnvironmentalException

public class BaseRuntimeException
extends RuntimeException
implements BaseException

This class is the common superclass for Arch4J runtime exceptions. It is similar to a RemoteException, in that it can hold a nested, wrapped exception. Since it extends RuntimeException, it can be used like other runtime exceptions and not declared in the throws clause of the method signature.

Copyright: Copyright (c) 2000

Company: SpiderLogic, a service of Wipfli Ullrich Bertelson LLP

Version:
1.0
Author:
Russ Brown, Ross E. Greinke
See Also:
Serialized Form

Field Summary
protected  Throwable nestedException
          The nested, wrapped exception.
 
Constructor Summary
BaseRuntimeException()
          Constructs a BaseRuntimeException with no specified detail message or nested exception.
BaseRuntimeException(String message)
          Constructs a BaseRuntimeException with the specified detail message.
BaseRuntimeException(String message, Throwable exception)
          Constructs a BaseRuntimeException with the specified detail message and nested exception.
BaseRuntimeException(Throwable exception)
          Constructs a BaseRuntimeException with the specified nested exception.
 
Method Summary
 String getMessage()
          Returns the detail message, including the message from the nested exception if there is one.
 Throwable getNestedException()
           
 String getStackTraceString()
           
 void printStackTrace()
          Prints the composite message to System.err.
 void printStackTrace(PrintStream ps)
          Prints the composite message and the embedded stack trace to the specified stream.
 void printStackTrace(PrintWriter pw)
          Prints the composite message and the embedded stack trace to the specified print writer.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nestedException

protected Throwable nestedException
The nested, wrapped exception.

Constructor Detail

BaseRuntimeException

public BaseRuntimeException()
Constructs a BaseRuntimeException with no specified detail message or nested exception.


BaseRuntimeException

public BaseRuntimeException(String message)
Constructs a BaseRuntimeException with the specified detail message.

Parameters:
message - The detailed message.

BaseRuntimeException

public BaseRuntimeException(Throwable exception)
Constructs a BaseRuntimeException with the specified nested exception.

Parameters:
exception - The nested exception.

BaseRuntimeException

public BaseRuntimeException(String message,
                            Throwable exception)
Constructs a BaseRuntimeException with the specified detail message and nested exception.

Parameters:
message - The detailed message.
exception - The nested exception.
Method Detail

getMessage

public String getMessage()
Returns the detail message, including the message from the nested exception if there is one.

Overrides:
getMessage in class Throwable

printStackTrace

public void printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream.

Overrides:
printStackTrace in class Throwable
Parameters:
ps - The print stream.

printStackTrace

public void printStackTrace()
Prints the composite message to System.err.

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer.

Overrides:
printStackTrace in class Throwable
Parameters:
pw - The print writer.

getNestedException

public Throwable getNestedException()
Specified by:
getNestedException in interface BaseException
Returns:
The nested, wrapped exception.

getStackTraceString

public String getStackTraceString()
Specified by:
getStackTraceString in interface BaseException
Returns:
The stack backtrace as a String.

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.