Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.foundation.exception
Class FatalApplicationException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--java.lang.RuntimeException
                        |
                        +--com.beasys.commerce.foundation.exception.FatalApplicationException

Direct Known Subclasses:
  OrderPackingException, QuoteException

public class FatalApplicationException
extends java.lang.RuntimeException
implements MessageCatalogException

The `FatalApplicationException` class is used to signal runtime business logic exceptions to a caller.

The `FatalApplicationException` class is closely tied to the `MessageCatalog`. An `FatalApplicationException` contains a log and user message that is constructed using the `MessageCatalog`. In fact, each `FatalApplicationException` derivative should have at least one user and log catalog message.

In the case of an EJB, the following guidelines should be followed:

Like the `ApplicationException` class, the `FatalApplicationException` class is used to signal business logic exceptions. However, unlike the `ApplicationException` class, if a bean method throws a `FatalApplicationException`, any existing transaction will be rolled back by the Container and the bean's state will be set to "does not exists". The net effect is the same as if the bean method threw a `SystemException`.

See Also:
  `MessageCatalog`, `ApplicationException`, `MessageCatalogException`, Serialized Form

Field Summary
`protected java.lang.Exception` | `embeddedException` The embedded exception.
`protected java.util.Stack` | `logMessages` The log messages.
`protected java.util.Stack` | `userMessages` The user messages.

Constructor Summary
`FatalApplicationException()` Constructs an `FatalApplicationException` with no associated message.
`FatalApplicationException(FatalApplicationException topException, FatalApplicationException bottomException)` Constructs an `FatalApplicationException` from two source `FatalApplicationException`s by concatinating the screen and log messages of the two source `FatalApplicationException`s.
`FatalApplicationException(java.lang.String namespace, java.lang.String messageKey)` Class constructor taking the namespace and key of the associated catalog message.
`FatalApplicationException(java.lang.String namespace, java.lang.String messageKey, java.lang.Exception exception)` Class constructor taking the namespace and key of the associated catalog message and an embedded exception.
`FatalApplicationException(java.lang.String namespace, java.lang.String messageKey, java.lang.Object argument)` Class constructor taking the namespace and key of the associated catalog message and a message parameter substitution argument.
`FatalApplicationException(java.lang.String namespace, java.lang.String messageKey, java.lang.Object[] arguments)` Class constructor taking the namespace and key of the associated catalog message and message parameter substitution arguments.
`FatalApplicationException(java.lang.String namespace, java.lang.String messageKey, java.lang.Object[] arguments, java.lang.Exception exception)` Class constructor taking the namespace and key of the associated catalog message, message parameter substitution arguments, and an embedded exception.
`FatalApplicationException(java.lang.String namespace, java.lang.String messageKey, java.lang.Object argument, java.lang.Exception exception)` Class constructor taking the namespace and key of the associated catalog message, message parameter substitution argument, and an embedded exception.

Method Summary
`void` | `addLogMessage(java.lang.String namespace, java.lang.String messageKey)`
`void` | `addLogMessage(java.lang.String namespace, java.lang.String messageKey, java.lang.Object argument)`
`void` | `addLogMessage(java.lang.String namespace, java.lang.String messageKey, java.lang.Object[] arguments)`
`void` | `addMessage(java.lang.String namespace, java.lang.String messageKey)`
`void` | `addMessage(java.lang.String namespace, java.lang.String messageKey, java.lang.Object argument)`
`void` | `addMessage(java.lang.String namespace, java.lang.String messageKey, java.lang.Object[] arguments)`
`void` | `addUserMessage(java.lang.String namespace, java.lang.String messageKey)`
`void` | `addUserMessage(java.lang.String namespace, java.lang.String messageKey, java.lang.Object argument)`
`void` | `addUserMessage(java.lang.String namespace, java.lang.String messageKey, java.lang.Object[] arguments)`
`java.lang.Exception` | `getEmbeddedException()`
`java.lang.String` | `getLocalizedMessage()` Returns the user message associated with this exception.
`java.lang.String` | `getLogMessage()`
`java.util.Iterator` | `getLogMessages()`
`java.lang.String` | `getMessage()` Returns the user message associated with this exception.
`java.lang.String` | `getUserMessage()`
`java.util.Iterator` | `getUserMessages()`
`java.lang.String` | `toString()` Returns a string representation of this exception.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, printStackTrace, printStackTrace, printStackTrace`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### embeddedException

    protected java.lang.Exception embeddedException

  The embedded exception.

### logMessages

    protected java.util.Stack logMessages

  The log messages.

### userMessages

    protected java.util.Stack userMessages

  The user messages.

Constructor Detail

### FatalApplicationException

    public FatalApplicationException()

  Constructs an `FatalApplicationException` with no associated message.

### FatalApplicationException

    public FatalApplicationException(FatalApplicationException topException,
                                     FatalApplicationException bottomException)

  Constructs an `FatalApplicationException` from two source `FatalApplicationException`s by concatinating the screen and log messages of the two source `FatalApplicationException`s. The messages of the first `FatalApplicationException` will preceed those of the second in the constructed `FatalApplicationException`. Furthermore, the new `FatalApplicationException` will have the embedded exception of the first `FatalApplicationException` associated with it.

  Parameters:
    `FatalApplicationException` - topException
    `FatalApplicationException` - bottomException

### FatalApplicationException

    public FatalApplicationException(java.lang.String namespace,
                                     java.lang.String messageKey)

  Class constructor taking the namespace and key of the associated catalog message.

  Parameters:
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.

### FatalApplicationException

    public FatalApplicationException(java.lang.String namespace,
                                     java.lang.String messageKey,
                                     java.lang.Exception exception)

  Class constructor taking the namespace and key of the associated catalog message and an embedded exception.

  Parameters:
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `exception` - The embedded exception.

### FatalApplicationException

    public FatalApplicationException(java.lang.String namespace,
                                     java.lang.String messageKey,
                                     java.lang.Object argument)

  Class constructor taking the namespace and key of the associated catalog message and a message parameter substitution argument.

  Parameters:
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `argument` - The message parameter substitution argument.

### FatalApplicationException

    public FatalApplicationException(java.lang.String namespace,
                                     java.lang.String messageKey,
                                     java.lang.Object argument,
                                     java.lang.Exception exception)

  Class constructor taking the namespace and key of the associated catalog message, message parameter substitution argument, and an embedded exception.

  Parameters:
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `argument` - The message parameter substitution argument.
    `exception` - The embedded exception.

### FatalApplicationException

    public FatalApplicationException(java.lang.String namespace,
                                     java.lang.String messageKey,
                                     java.lang.Object[] arguments)

  Class constructor taking the namespace and key of the associated catalog message and message parameter substitution arguments.

  Parameters:
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `arguments` - The message parameter substitution arguments.

### FatalApplicationException

    public FatalApplicationException(java.lang.String namespace,
                                     java.lang.String messageKey,
                                     java.lang.Object[] arguments,
                                     java.lang.Exception exception)

  Class constructor taking the namespace and key of the associated catalog message, message parameter substitution arguments, and an embedded exception.

  Parameters:
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `arguments` - The message parameter substitution arguments.
    `exception` - The embedded exception.

Method Detail

### getEmbeddedException

    public java.lang.Exception getEmbeddedException()

  Specified by:
    getEmbeddedException in interface MessageCatalogException

### getLogMessage

    public java.lang.String getLogMessage()

  Specified by:
    getLogMessage in interface MessageCatalogException

### getLogMessages

    public java.util.Iterator getLogMessages()

  Specified by:
    getLogMessages in interface MessageCatalogException

### addLogMessage

    public void addLogMessage(java.lang.String namespace,
                              java.lang.String messageKey)

  Specified by:
    addLogMessage in interface MessageCatalogException

### addLogMessage

    public void addLogMessage(java.lang.String namespace,
                              java.lang.String messageKey,
                              java.lang.Object argument)

  Specified by:
    addLogMessage in interface MessageCatalogException

### addLogMessage

    public void addLogMessage(java.lang.String namespace,
                              java.lang.String messageKey,
                              java.lang.Object[] arguments)

  Specified by:
    addLogMessage in interface MessageCatalogException

### getUserMessage

    public java.lang.String getUserMessage()

  Specified by:
    getUserMessage in interface MessageCatalogException

### getUserMessages

    public java.util.Iterator getUserMessages()

  Specified by:
    getUserMessages in interface MessageCatalogException

### addUserMessage

    public void addUserMessage(java.lang.String namespace,
                               java.lang.String messageKey)

  Specified by:
    addUserMessage in interface MessageCatalogException

### addUserMessage

    public void addUserMessage(java.lang.String namespace,
                               java.lang.String messageKey,
                               java.lang.Object argument)

  Specified by:
    addUserMessage in interface MessageCatalogException

### addUserMessage

    public void addUserMessage(java.lang.String namespace,
                               java.lang.String messageKey,
                               java.lang.Object[] arguments)

  Specified by:
    addUserMessage in interface MessageCatalogException

### addMessage

    public void addMessage(java.lang.String namespace,
                           java.lang.String messageKey)

  Specified by:
    addMessage in interface MessageCatalogException

### addMessage

    public void addMessage(java.lang.String namespace,
                           java.lang.String messageKey,
                           java.lang.Object argument)

  Specified by:
    addMessage in interface MessageCatalogException

### addMessage

    public void addMessage(java.lang.String namespace,
                           java.lang.String messageKey,
                           java.lang.Object[] arguments)

  Specified by:
    addMessage in interface MessageCatalogException

### getMessage

    public java.lang.String getMessage()

  Returns the user message associated with this exception.

  Returns:
    The user message associated with this exception.
  Overrides:
    getMessage in class java.lang.Throwable

### getLocalizedMessage

    public java.lang.String getLocalizedMessage()

  Returns the user message associated with this exception.

  Returns:
    The user message associated with this exception.
  Overrides:
    getLocalizedMessage in class java.lang.Throwable

### toString

    public java.lang.String toString()

  Returns a string representation of this exception.

  Returns:
    A string representation of this exception.
  Overrides:
    toString in class java.lang.Throwable

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved