edu.cmu.aura.service
Class ServiceException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--edu.cmu.aura.service.ServiceException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExpressionNotSupportedException, FunctionNotSupportedException, GeneralServiceException, InternalServiceException, ReqNotSupportedException, RequestException

public abstract class ServiceException
extends java.lang.Exception

Base class for service exceptions.

See Also:
Serialized Form

Constructor Summary
ServiceException(int errorCode)
          Creates a new ServiceException.
ServiceException(int errorCode, java.lang.Exception subException)
          Creates a new ServiceException.
ServiceException(int errorCode, java.lang.String msg)
          Creates a new ServiceException.
ServiceException(int errorCode, java.lang.String msg, java.lang.Exception subException)
          Creates a new ServiceException.
 
Method Summary
 int getErrorCode()
          Gets the error code associated with this ServiceException.
 void printStackTrace()
          Prints a stack trace showing where the exception occurred.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceException

public ServiceException(int errorCode)
Creates a new ServiceException.


ServiceException

public ServiceException(int errorCode,
                        java.lang.String msg)
Creates a new ServiceException.

Parameters:
msg - message indicating the cause of the problem

ServiceException

public ServiceException(int errorCode,
                        java.lang.Exception subException)
Creates a new ServiceException.

Parameters:
subException - original exception that caused the problem

ServiceException

public ServiceException(int errorCode,
                        java.lang.String msg,
                        java.lang.Exception subException)
Creates a new ServiceException.

Parameters:
msg - message indicating the cause of the problem
subException - original exception that caused the problem
Method Detail

printStackTrace

public void printStackTrace()
Prints a stack trace showing where the exception occurred.

Overrides:
printStackTrace in class java.lang.Throwable

getErrorCode

public int getErrorCode()
Gets the error code associated with this ServiceException.

Returns:
the error code associated with this ServiceException