at.dms.util
Class FormattedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by at.dms.util.FormattedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PositionedError

public class FormattedException
extends Exception

This class defines exceptions formatted using message descriptions.

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, Object parameter)
          An exception with one parameter
FormattedException(MessageDescription description, Object[] parameters)
          An exception with an arbitrary number of parameters
FormattedException(MessageDescription description, Object parameter1, Object parameter2)
          An exception with two parameters
 
Method Summary
 Message getFormattedMessage()
          Returns the formatted message.
 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, 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
 

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,
                          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,
                          Object parameter1,
                          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,
                          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 String getMessage()
Returns a string explaining the exception.

Overrides:
getMessage in class Throwable

getFormattedMessage

public Message getFormattedMessage()
Returns the formatted message.


hasDescription

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