org.jboss.test.util.ejb
Class RemoteTestException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.jboss.test.util.ejb.RemoteTestException
All Implemented Interfaces:
java.io.Serializable

public class RemoteTestException
extends java.lang.Exception

RemoteTestException is the client-side view of a throwable on the server. All throwables caught on the server are wrapped with a RemoteTestException and rethrown. On the client side the exception is caught, and if the server side exception is an instance of AssertionFailedError, it is wrapped with a RemoteAssertionFailedError and rethrown. That makes the exception an instance of AssertionFailedError so it is reconized as a failure and not an Error.

See Also:
Serialized Form

Constructor Summary
RemoteTestException(java.lang.Throwable e)
          Constructs a remote test exception that wrapps the the specified throwable.
 
Method Summary
 java.lang.String getMessage()
          Gets the message exactly as it appeared on server side.
 java.lang.String getRemoteStackTrace()
          Gets the stack trace exactly as it appeared on the server side.
 java.lang.Throwable getRemoteThrowable()
          Gets the throwable object from the server side.
 void printStackTrace()
          Prints the stack trace exactly as it appeared on the server side.
 void printStackTrace(java.io.PrintStream ps)
          Prints the stack trace exactly as it appeared on the server side.
 void printStackTrace(java.io.PrintWriter pw)
          Prints the stack trace exactly as it appeared on the server side.
 
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
 

Constructor Detail

RemoteTestException

public RemoteTestException(java.lang.Throwable e)
Constructs a remote test exception that wrapps the the specified throwable.

Parameters:
e - the Throwable that was thrown on the server side
Method Detail

getMessage

public java.lang.String getMessage()
Gets the message exactly as it appeared on server side.

Returns:
the message exactly as it appeared on server side

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Prints the stack trace exactly as it appeared on the server side.

Parameters:
ps - the PrintStream on which the stack trace is printed

printStackTrace

public void printStackTrace()
Prints the stack trace exactly as it appeared on the server side.


printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Prints the stack trace exactly as it appeared on the server side.

Parameters:
pw - the PrintWriter on which the stack trace is printed

getRemoteThrowable

public java.lang.Throwable getRemoteThrowable()
Gets the throwable object from the server side. Note: the stack trace of this object is not available because exceptions don't seralize the stack trace. Use getRemoteStackTrace to get the stack trace as it appeared on the server.

Returns:
the Throwable object from the server side.

getRemoteStackTrace

public java.lang.String getRemoteStackTrace()
Gets the stack trace exactly as it appeared on the server side.

Returns:
the stack trace exactly as it appeared on the server side