com.rshtech.exception
Class SystemException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.rshtech.exception.SystemException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DataStoreException, InvalidStateException, RuntimeRuleFailureException

public class SystemException
extends java.lang.RuntimeException

A base Exception for system exceptions, exceptions which are not expected and occur due to runtime states or values (as opposed to applications exceptions whose possibility is declared in the code and is a compile-time known factor). System exceptions are considered "non-recoverable", as they were not expected and usually result from errors in the system's configuration or state. It is highly recommended that SystemExceptions be used only for unexpected, unrecoverable errors. If you need a runtime exception that is recoverable, catch the SystemException as soon as possible and wrap it in an appropriate ApplicationException to make it a known issue for the compile-time code checks.

SystemExceptions are "error code based", meaning that all SystemExceptions are built using an ErrorCode object, which in turn references an existing error code entry (which then lists the corresponding error message). This allows for standardized error messages that can also be internationalized. See the ErrorCode class for more information. SystemException has a default error code for cases when the ErrorCode is not supplied.

Version:
$Revision: 3137 $
Author:
$Author: kostya $
See Also:
ApplicationException, ErrorCode, ErrorInformation, ErrorMessageUtil, Serialized Form

Field Summary
static ErrorCode SYS_DEFAULT_ERROR_CODE
           
 
Constructor Summary
SystemException()
           
SystemException(ErrorCode code)
           
SystemException(ErrorCode code, java.lang.String details)
           
SystemException(ErrorCode code, java.lang.String details, java.lang.Throwable rootCause)
           
SystemException(ErrorCode code, java.lang.Throwable rootCause)
           
SystemException(java.lang.String details)
           
SystemException(java.lang.String details, java.lang.Throwable rootCause)
           
SystemException(java.lang.Throwable rootCause)
           
 
Method Summary
 java.lang.String getDetails()
           
 ErrorCode getErrorCode()
           
 java.lang.String getErrorMessage()
           
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SYS_DEFAULT_ERROR_CODE

public static final ErrorCode SYS_DEFAULT_ERROR_CODE
Constructor Detail

SystemException

public SystemException()

SystemException

public SystemException(ErrorCode code)

SystemException

public SystemException(ErrorCode code,
                       java.lang.String details)

SystemException

public SystemException(java.lang.String details)

SystemException

public SystemException(java.lang.Throwable rootCause)

SystemException

public SystemException(ErrorCode code,
                       java.lang.Throwable rootCause)

SystemException

public SystemException(java.lang.String details,
                       java.lang.Throwable rootCause)

SystemException

public SystemException(ErrorCode code,
                       java.lang.String details,
                       java.lang.Throwable rootCause)
Method Detail

getErrorCode

public ErrorCode getErrorCode()

getErrorMessage

public java.lang.String getErrorMessage()

getDetails

public java.lang.String getDetails()

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable