org.codehaus.aspectwerkz.exception
Class WrappedRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.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(String message, Throwable throwable)
          Creates a new WrappedRuntimeException.
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.

WrappedRuntimeException

public WrappedRuntimeException(String message,
                               Throwable throwable)
Creates a new WrappedRuntimeException.

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

getMessage

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

Overrides:
getMessage in class Throwable
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.

Overrides:
getLocalizedMessage in class Throwable
Returns:
the localized description of the wrapped exception.

getCause

public Throwable getCause()
Returns the original exception.

Overrides:
getCause in class Throwable
Returns:
the cause

toString

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

Overrides:
toString in class Throwable
Returns:
a string representation of the wrapped exception.

printStackTrace

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

Overrides:
printStackTrace in class Throwable

printStackTrace

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

Overrides:
printStackTrace in class Throwable
Parameters:
s - the print stream

printStackTrace

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

Overrides:
printStackTrace in class Throwable
Parameters:
s - the print writer


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