org.codehaus.aspectwerkz.exception
Class WrappedRuntimeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.codehaus.aspectwerkz.exception.WrappedRuntimeException
All Implemented Interfaces:
Serializable

public class WrappedRuntimeException
extends RuntimeException

Wrappes the original throwable in a RuntimeException.

Author:
Jonas Bonér
See Also:
Serialized Form

Constructor Summary
WrappedRuntimeException(Throwable throwable)
          Creates a new WrappedRuntimeException.
 
Method Summary
 Throwable getCause()
          Returns the original exception.
 String getLocalizedMessage()
          Returns the localized description of the wrapped exception in order to produce a locale-specific message.
 String getMessage()
          Returns the error message string of the wrapped exception.
 void printStackTrace()
          Prints the wrapped exception A its backtrace to the standard error stream.
 void printStackTrace(PrintStream s)
          Prints the wrapped excpetion A its backtrace to the specified print stream.
 void printStackTrace(PrintWriter s)
          Prints the wrapped exception A its backtrace to the specified print writer.
 String toString()
          Returns a short description of the wrapped exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WrappedRuntimeException

public WrappedRuntimeException(Throwable throwable)
Creates a new WrappedRuntimeException.

Parameters:
throwable - the non-RuntimeException to be wrapped.
Method Detail

getMessage

public String getMessage()
Returns the error message string of the wrapped exception.

Returns:
the error message string of the wrapped exception

getLocalizedMessage

public String getLocalizedMessage()
Returns the localized description of the wrapped exception in order to produce a locale-specific message.

Returns:
the localized description of the wrapped exception.

getCause

public Throwable getCause()
Returns the original exception.

Returns:
the cause

toString

public String toString()
Returns a short description of the wrapped exception.

Returns:
a string representation of the wrapped exception.

printStackTrace

public void printStackTrace()
Prints the wrapped exception A its backtrace to the standard error stream.


printStackTrace

public void printStackTrace(PrintStream s)
Prints the wrapped excpetion A its backtrace to the specified print stream.

Parameters:
s - the print stream

printStackTrace

public void printStackTrace(PrintWriter s)
Prints the wrapped exception A its backtrace to the specified print writer.

Parameters:
s - the print writer


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.