Class AbstractException

  • All Implemented Interfaces:
    java.io.Serializable, ErrorCodeAccessor, Trap
    Direct Known Subclasses:
    LockedException, MarshalException, UnmarshalException, VetoException

    public abstract class AbstractException
    extends java.lang.Exception
    implements Trap
    Base exception for unpredictable / checked (untestable states) exceptions, providing functionality for exception specific multi-language messages. Unpredictable exceptions must be declared or explicitly caught. You as a programmer cannot take care to prevent such exceptions by according (business) logic. Such exceptions may be network connection loss or external peripheral failure.
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractException

        public AbstractException​(java.lang.String message,
                                 java.lang.Throwable cause)
        Instantiates a new abstract exception.
        Parameters:
        message - the message
        cause - the cause
      • AbstractException

        public AbstractException​(java.lang.String message)
        Instantiates a new abstract exception.
        Parameters:
        message - the message
      • AbstractException

        public AbstractException​(java.lang.Throwable cause)
        Instantiates a new abstract exception.
        Parameters:
        cause - the cause
      • AbstractException

        public AbstractException​(java.lang.String aMessage,
                                 java.lang.Throwable aCause,
                                 java.lang.String aErrorCode)
        Parameters:
        aMessage - - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
        aCause - - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
        aErrorCode - The exception code to be assigned to the exception. An exception code can be provided when creating an exception and it can be used by the business logic to retrieve a language depended exception message (multi-language support) from a language pack instead of just providing the single language message as being stored by the default exceptions.
      • AbstractException

        public AbstractException​(java.lang.String aMessage,
                                 java.lang.String aErrorCode)
        Parameters:
        aMessage - - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
        aErrorCode - The exception code to be assigned to the exception. An exception code can be provided when creating an exception and it can be used by the business logic to retrieve a language depended exception message (multi-language support) from a language pack instead of just providing the single language message as being stored by the default exceptions.
      • AbstractException

        public AbstractException​(java.lang.Throwable aCause,
                                 java.lang.String aErrorCode)
        /**
        Parameters:
        aCause - - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
        aErrorCode - The exception code to be assigned to the exception. An exception code can be provided when creating an exception and it can be used by the business logic to retrieve a language depended exception message (multi-language support) from a language pack instead of just providing the single language message as being stored by the default exceptions.
    • Method Detail

      • getErrorCode

        public java.lang.String getErrorCode()
        Provides the according exception code. An exception code can be provided when creating an exception and it can be used by the business logic to retrieve a language depended exception message (multi-language support) from a language pack instead of just providing the single language message as being stored by the default exceptions.
        Specified by:
        getErrorCode in interface ErrorCodeAccessor
        Returns:
        The exception code in question.