com.caucho.ejb
Class RemoteExceptionWrapper

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by java.rmi.RemoteException
                  extended by com.caucho.ejb.RemoteExceptionWrapper
All Implemented Interfaces:
ExceptionWrapper, java.io.Serializable

public class RemoteExceptionWrapper
extends java.rmi.RemoteException
implements ExceptionWrapper

Wraps the actual exception with an Remote exception

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.RemoteException
detail
 
Constructor Summary
RemoteExceptionWrapper()
          Null constructor for beans
RemoteExceptionWrapper(java.lang.String msg)
          Create a basic RemoteExceptionWrapper with a message.
RemoteExceptionWrapper(java.lang.Throwable rootCause)
          Create a RemoteExceptionWrapper wrapping a root exception.
 
Method Summary
static RemoteExceptionWrapper create(java.lang.Throwable rootCause)
           
 java.lang.String getMessage()
          Returns the appropriate exception message.
 java.lang.Throwable getRootCause()
          Returns the root exception if it exists.
 void printStackTrace()
          Prints the stack trace, preferring the root cause if it exists.
 void printStackTrace(java.io.PrintStream os)
          Prints the stack trace, preferring the root cause if it exists.
 void printStackTrace(java.io.PrintWriter os)
          Prints the stack trace, preferring the root cause if it exists.
 java.lang.String toString()
          Print the exception as a string.
 
Methods inherited from class java.rmi.RemoteException
getCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteExceptionWrapper

public RemoteExceptionWrapper()
Null constructor for beans


RemoteExceptionWrapper

public RemoteExceptionWrapper(java.lang.String msg)
Create a basic RemoteExceptionWrapper with a message.

Parameters:
msg - the exception message.

RemoteExceptionWrapper

public RemoteExceptionWrapper(java.lang.Throwable rootCause)
Create a RemoteExceptionWrapper wrapping a root exception.

Parameters:
rootCause - the underlying wrapped exception.
Method Detail

create

public static RemoteExceptionWrapper create(java.lang.Throwable rootCause)

getRootCause

public java.lang.Throwable getRootCause()
Returns the root exception if it exists.

Specified by:
getRootCause in interface ExceptionWrapper
Returns:
the underlying wrapped exception.

getMessage

public java.lang.String getMessage()
Returns the appropriate exception message.

Overrides:
getMessage in class java.rmi.RemoteException

printStackTrace

public void printStackTrace()
Prints the stack trace, preferring the root cause if it exists.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream os)
Prints the stack trace, preferring the root cause if it exists.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter os)
Prints the stack trace, preferring the root cause if it exists.

Overrides:
printStackTrace in class java.lang.Throwable

toString

public java.lang.String toString()
Print the exception as a string.

Overrides:
toString in class java.lang.Throwable