com.ail.core
Class BaseServerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.ejb.EJBException
                  extended by com.ail.core.BaseServerException
All Implemented Interfaces:
java.io.Serializable

public class BaseServerException
extends javax.ejb.EJBException

This exceptions is used to pass server side BaseErrors and BaseExceptions back to the client as an EJBException - so the container will rollback etc.

Version:
$Revision: 1.2 $
See Also:
Serialized Form

Constructor Summary
BaseServerException(BaseError error)
          Create an instance wrapping a BaseError
BaseServerException(BaseException exception)
          Create an instance wrapping a BaseException
 
Method Summary
 java.lang.Throwable getCause()
          Get the wrapped exception/error that caused this to the thrown.
 BaseError getCauseError()
          Get the BaseError that caused this BaseServerException to be thrown.
 BaseException getCauseException()
          Get the BaseException that caused this BaseServerException to be thrown.
 void throwCause()
          Rethrow the BaseException/BaseError that caused this BaseServerException to be thrown.
 java.lang.String toString()
          Report the underlying BaseError/BaseException message
 
Methods inherited from class javax.ejb.EJBException
getCausedByException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseServerException

public BaseServerException(BaseError error)
Create an instance wrapping a BaseError

Parameters:
error -

BaseServerException

public BaseServerException(BaseException exception)
Create an instance wrapping a BaseException

Parameters:
exception -
Method Detail

getCause

public java.lang.Throwable getCause()
Get the wrapped exception/error that caused this to the thrown.

Overrides:
getCause in class java.lang.Throwable
Returns:
An instance of a BaseError or BaseException.

throwCause

public void throwCause()
                throws BaseException
Rethrow the BaseException/BaseError that caused this BaseServerException to be thrown.

Throws:
BaseException - If the cause was a BaseException

getCauseException

public BaseException getCauseException()
Get the BaseException that caused this BaseServerException to be thrown.

Returns:
BaseExeption or null if the cause was a BaseError

getCauseError

public BaseError getCauseError()
Get the BaseError that caused this BaseServerException to be thrown.

Returns:
BaseError or null if the case was a BaseException.

toString

public java.lang.String toString()
Report the underlying BaseError/BaseException message

Overrides:
toString in class java.lang.Throwable
Returns:
String