at.dms.util
Class FormattedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--at.dms.util.FormattedException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LexgenError, MsggenError, OptgenError, PositionedError

public class FormattedException
extends java.lang.Exception

This class defines exceptions that contain pre-formatted messages.

See Also:
Serialized Form

Constructor Summary
FormattedException(Message message)
          An exception with a formatted message as argument.
FormattedException(MessageDescription description)
          An exception without parameters.
FormattedException(MessageDescription description, java.lang.Object parameter)
          An exception with one parameter.
FormattedException(MessageDescription description, java.lang.Object[] parameters)
          An exception with an arbitrary number of parameters.
FormattedException(MessageDescription description, java.lang.Object parameter1, java.lang.Object parameter2)
          An exception with two parameters.
 
Method Summary
 java.lang.String getErrorMessage()
          Returns the string explaining the exception.
 Message getFormattedMessage()
          Returns the formatted message.
 java.lang.String getMessage()
          Returns a string explaining the exception.
 boolean hasDescription(MessageDescription description)
          Returns true iff the error has specified description.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormattedException

public FormattedException(Message message)
An exception with a formatted message as argument.
Parameters:
message - the formatted message.

FormattedException

public FormattedException(MessageDescription description,
                          java.lang.Object[] parameters)
An exception with an arbitrary number of parameters.
Parameters:
description - the message description.
parameters - the array of parameters.

FormattedException

public FormattedException(MessageDescription description,
                          java.lang.Object parameter1,
                          java.lang.Object parameter2)
An exception with two parameters.
Parameters:
description - the message description.
parameter1 - the first parameter.
parameter2 - the second parameter.

FormattedException

public FormattedException(MessageDescription description,
                          java.lang.Object parameter)
An exception with one parameter.
Parameters:
description - the message description.
parameter - the parameter.

FormattedException

public FormattedException(MessageDescription description)
An exception without parameters.
Parameters:
description - the message description.
Method Detail

getMessage

public java.lang.String getMessage()
Returns a string explaining the exception.
Overrides:
getMessage in class java.lang.Throwable

getFormattedMessage

public Message getFormattedMessage()
Returns the formatted message.

getErrorMessage

public java.lang.String getErrorMessage()
Returns the string explaining the exception.

hasDescription

public boolean hasDescription(MessageDescription description)
Returns true iff the error has specified description.