Package com.sun.javatest.tool
Class Command.Fault
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.sun.javatest.tool.Command.Fault
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Command
public class Command.Fault extends java.lang.Exception
This exception is used to report problems with a specific command.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Fault(CommandContext.Fault e)
Create a Fault, by wrapping a CommandContext Fault.Fault(I18NResourceBundle i18n, java.lang.String s)
Create a Fault.Fault(I18NResourceBundle i18n, java.lang.String s, java.lang.Object o)
Create a Fault.Fault(I18NResourceBundle i18n, java.lang.String s, java.lang.Object... o)
Create a Fault.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Command
getCommand()
Get the command that created this fault.
-
-
-
Constructor Detail
-
Fault
public Fault(I18NResourceBundle i18n, java.lang.String s)
Create a Fault.- Parameters:
i18n
- A resource bundle in which to find the detail message.s
- The key for the detail message.
-
Fault
public Fault(I18NResourceBundle i18n, java.lang.String s, java.lang.Object o)
Create a Fault.- Parameters:
i18n
- A resource bundle in which to find the detail message.s
- The key for the detail message.o
- An argument to be formatted with the detail message byMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
-
Fault
public Fault(I18NResourceBundle i18n, java.lang.String s, java.lang.Object... o)
Create a Fault.- Parameters:
i18n
- A resource bundle in which to find the detail message.s
- The key for the detail message.o
- An array of arguments to be formatted with the detail message byMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
-
Fault
public Fault(CommandContext.Fault e)
Create a Fault, by wrapping a CommandContext Fault. The message string will be propagated directly; the argument fault will be set as the cause for this fault.- Parameters:
e
- A CommandContext.Fault to wrap.
-
-
Method Detail
-
getCommand
public Command getCommand()
Get the command that created this fault.- Returns:
- the command that created this fault
-
-