org.apache.geronimo.common
Class ParameterizedException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.apache.geronimo.common.ParameterizedException
All Implemented Interfaces:
Serializable

public class ParameterizedException
extends Exception

Allows for an exception to be formatted using a given list of parameters.

Version:
$Revision: 1.3 $ $Date: 2004/03/10 09:58:25 $
See Also:
Serialized Form

Constructor Summary
ParameterizedException()
          Default constructor.
ParameterizedException(String message)
          Exception with a given message.
ParameterizedException(String message, Object[] params)
          Exception with a formatted message
ParameterizedException(String message, Object[] params, Throwable ex)
          Exception with a formatted message and root cause.
ParameterizedException(String message, Throwable cause)
          Exception with a given message and root cause.
ParameterizedException(Throwable cause)
          Exception with a root cause.
 
Method Summary
static String getFormattedMessage(String message, Object[] params)
          Formats the given message
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

ParameterizedException

public ParameterizedException()
Default constructor.


ParameterizedException

public ParameterizedException(String message)
Exception with a given message.

Parameters:
message - unformatted message.

ParameterizedException

public ParameterizedException(String message,
                              Throwable cause)
Exception with a given message and root cause.

Parameters:
message - unformatted message.
cause - root cause of the exception.

ParameterizedException

public ParameterizedException(Throwable cause)
Exception with a root cause.

Parameters:
cause - root cause of the exception.

ParameterizedException

public ParameterizedException(String message,
                              Object[] params)
Exception with a formatted message

Parameters:
params - message parameters
See Also:
MessageFormat

ParameterizedException

public ParameterizedException(String message,
                              Object[] params,
                              Throwable ex)
Exception with a formatted message and root cause.

Parameters:
params - message parameters
ex - root cause
See Also:
MessageFormat
Method Detail

getFormattedMessage

public static String getFormattedMessage(String message,
                                         Object[] params)
Formats the given message

Parameters:
params - message parameters
Returns:
the formatted message


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.