com.ibm.commerce.component.exception

Class ServiceException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.ibm.commerce.component.exception.ServiceException
  • All Implemented Interfaces:
    com.ibm.commerce.exception.ECCorrelatedIdentity, java.io.Serializable
    Direct Known Subclasses:
    BusinessContextServiceException


    public class ServiceException
    extends java.lang.Exception
    implements java.io.Serializable, com.ibm.commerce.exception.ECCorrelatedIdentity
    The service exception to be returned by a Web service executing a WebSphere Commerce service.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ServiceException()
      Constructs a ServiceException.
      ServiceException(java.lang.String correlationIdentifier, long reasonCode, java.lang.String localizedMessage, java.lang.String[] symptomData, ServiceParameterError[] serviceParameterErrors, boolean recoverable)
      Constructs a ServiceException.
      ServiceException(java.lang.String correlationIdentifier, long reasonCode, java.lang.String message, java.lang.String localizedMessage, java.lang.String[] symptomData, ServiceParameterError[] serviceParameterErrors, boolean recoverable)
      Constructs a ServiceException.
      ServiceException(java.lang.Throwable throwable)
      Constructs a ServiceException.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getCorrelationIdentifier()
      Gets the exception correlation identifier.
      java.lang.String getLocalizedMessage()
      Gets the localized exception message.
      java.lang.String getMessage()
      Gets the exception message.
      long getReasonCode()
      Gets the reason code.
      ServiceParameterError[] getServiceParameterErrors()
      Gets the related service parameter errors if any are available.
      java.lang.String[] getSymptomData()
      Gets the symptom data.
      boolean isRecoverable()
      Checks whether this service exception is recoverable.
      void printStackTrace(java.io.PrintStream s)
      Calls super printStackTrace() and prints out the correlation identifier if one exists.
      void printStackTrace(java.io.PrintWriter s)
      Calls super printStackTrace() and prints out the correlation identifier if one exists.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServiceException

        public ServiceException()
        Constructs a ServiceException.
      • ServiceException

        public ServiceException(java.lang.Throwable throwable)
        Constructs a ServiceException.
        Parameters:
        throwable - The cause of the exception.
      • ServiceException

        public ServiceException(java.lang.String correlationIdentifier,
                                long reasonCode,
                                java.lang.String localizedMessage,
                                java.lang.String[] symptomData,
                                ServiceParameterError[] serviceParameterErrors,
                                boolean recoverable)
        Constructs a ServiceException.
        Parameters:
        errorCorrelationId - The exception correlation identifier.
        reasonCode - The reason code.
        localizedMessage - The localized message.
        symptomData - The symptom data.
        serviceParameterErrors - The service parameter errors associated with the exception.
        recoverable - Whether the exception is recoverable.
      • ServiceException

        public ServiceException(java.lang.String correlationIdentifier,
                                long reasonCode,
                                java.lang.String message,
                                java.lang.String localizedMessage,
                                java.lang.String[] symptomData,
                                ServiceParameterError[] serviceParameterErrors,
                                boolean recoverable)
        Constructs a ServiceException.
        Parameters:
        errorCorrelationId - The exception correlation identifier.
        reasonCode - The reason code.
        message - The exception message.
        localizedMessage - The localized exception message.
        symptomData - The symptom data.
        serviceParameterErrors - The service parameter errors associated with the exception.
        recoverable - Whether the exception is recoverable.
    • Method Detail

      • getCorrelationIdentifier

        public java.lang.String getCorrelationIdentifier()
        Gets the exception correlation identifier.
        Specified by:
        getCorrelationIdentifier in interface com.ibm.commerce.exception.ECCorrelatedIdentity
        Returns:
        the exception correlation identifier
      • getReasonCode

        public long getReasonCode()
        Gets the reason code.
        Returns:
        the reason code
      • getMessage

        public java.lang.String getMessage()
        Gets the exception message.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        the localized message
      • getLocalizedMessage

        public java.lang.String getLocalizedMessage()
        Gets the localized exception message.
        Overrides:
        getLocalizedMessage in class java.lang.Throwable
        Returns:
        the localized message.
      • getSymptomData

        public java.lang.String[] getSymptomData()
        Gets the symptom data.
        Returns:
        the symptom data
      • getServiceParameterErrors

        public ServiceParameterError[] getServiceParameterErrors()
        Gets the related service parameter errors if any are available.
        Returns:
        an array of related service parameter errors; null if none are available
      • isRecoverable

        public boolean isRecoverable()
        Checks whether this service exception is recoverable. If it is, the client that initiated it could retry to execute the same request again successfully. Exceptions that are not related to either system configuration or execution attributes - and are related to concurrency control, for example (such as a transaction rollback due to database deadlocks) - can often be recoverable.
        Returns:
        true if this exception is recoverable; false otherwise
      • printStackTrace

        public void printStackTrace(java.io.PrintWriter s)
        Calls super printStackTrace() and prints out the correlation identifier if one exists.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Parameters:
        s - The PrintWriter to write the stack.
        See Also:
        Throwable.printStackTrace(java.io.PrintWriter)
      • printStackTrace

        public void printStackTrace(java.io.PrintStream s)
        Calls super printStackTrace() and prints out the correlation identifier if one exists.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Parameters:
        s - The PrintStream to write the stack.
        See Also:
        Throwable.printStackTrace(java.io.PrintStream)