Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javatest
Class JavaTestError

    java.lang.Object
      java.lang.Throwable
          java.lang.Error
              com.sun.javatest.JavaTestError

All Implemented Interfaces:
  java.io.Serializable

    public class JavaTestError

extends java.lang.Error

Special error class to be used for errors which may pop out of JT Harness and be seen by the user.

See Also:
  Serialized Form

Field Summary
`protected java.lang.Throwable` | `original` The original problem.

Constructor Summary
`JavaTestError(I18NResourceBundle i18n, java.lang.String key)` Constructs a JavaTestError object with an I18N string as the message.
`JavaTestError(I18NResourceBundle i18n, java.lang.String key, java.lang.Object arg)` Constructs a JavaTestError object with an I18N string as the message.
`JavaTestError(I18NResourceBundle i18n, java.lang.String key, java.lang.Object[] args)` Constructs a JavaTestError object with an I18N string as the message.
`JavaTestError(I18NResourceBundle i18n, java.lang.String key, java.lang.Object[] args, java.lang.Throwable original)` Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown.
`JavaTestError(I18NResourceBundle i18n, java.lang.String key, java.lang.Object arg, java.lang.Throwable original)` Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown.
`JavaTestError(I18NResourceBundle i18n, java.lang.String key, java.lang.Throwable original)` Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown.
`JavaTestError(java.lang.String s)` Constructs a JavaTestError object with a literal string as the message text.
`JavaTestError(java.lang.String s, java.lang.Throwable original)` Constructs a JavaTestError object with a literal string as the message text.
`JavaTestError(java.lang.Throwable original)` Constructs a JavaTestError object to be thrown when an unexpected exception has been caught.

Method Summary
`java.lang.Throwable` | `getOriginalFault()` If available, find out what error or exception caused JT Harness to create this object and to throw it.
`void` | `printStackTrace()`
`void` | `printStackTrace(java.io.PrintStream s)`
`void` | `printStackTrace(java.io.PrintWriter s)`
`static void` | `unexpectedException(java.lang.Throwable t)` Print out a message when an unexpected exception has been caught.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString`

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

Field Detail

### original

    protected java.lang.Throwable original

  The original problem. Useful if you need the stack trace.

Constructor Detail

### JavaTestError

    public JavaTestError(java.lang.String s)

  Constructs a JavaTestError object with a literal string as the message text. You should ensure that the string you supply here is subject to I18N.

  Parameters:
    `s` - Literal string to use as the message text.

### JavaTestError

    public JavaTestError(java.lang.String s,
                         java.lang.Throwable original)

  Constructs a JavaTestError object with a literal string as the message text. You should ensure that the string you supply here is subject to I18N.

  Parameters:
    `s` - Literal string to use as the message text.
    `original` - The exception which originally caused the problem.

### JavaTestError

    public JavaTestError(java.lang.Throwable original)

  Constructs a JavaTestError object to be thrown when an unexpected exception has been caught.

  Parameters:
    `original` - The exception which originally caused the problem.
  See Also:
    `unexpectedException(java.lang.Throwable)`

### JavaTestError

    public JavaTestError(I18NResourceBundle i18n,
                         java.lang.String key)

  Constructs a JavaTestError object with an I18N string as the message.

  Parameters:
    `i18n` - The resource bundle to get the message text from.
    `key` - The key to access the resource bundle.

### JavaTestError

    public JavaTestError(I18NResourceBundle i18n,
                         java.lang.String key,
                         java.lang.Object arg)

  Constructs a JavaTestError object with an I18N string as the message.

  Parameters:
    `i18n` - The resource bundle to get the message text from.
    `key` - The key to access the resource bundle.
    `arg` - Item to be substituted into the internationalized string.

### JavaTestError

    public JavaTestError(I18NResourceBundle i18n,
                         java.lang.String key,
                         java.lang.Object[] args)

  Constructs a JavaTestError object with an I18N string as the message.

  Parameters:
    `i18n` - The resource bundle to get the message text from.
    `key` - The key to access the resource bundle.
    `args` - Items to be substituted into the internationalized string.

### JavaTestError

    public JavaTestError(I18NResourceBundle i18n,
                         java.lang.String key,
                         java.lang.Throwable original)

  Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown. The original throwable will probably be something like an IOException object.

  Parameters:
    `i18n` - The resource bundle to get the message text from.
    `key` - The key to access the resource bundle.
    `original` - The problem which ultimately caused this error.

### JavaTestError

    public JavaTestError(I18NResourceBundle i18n,
                         java.lang.String key,
                         java.lang.Object arg,
                         java.lang.Throwable original)

  Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown. The original throwable will probably be something like an IOException object.

  Parameters:
    `i18n` - The resource bundle to get the message text from.
    `key` - The key to access the resource bundle.
    `arg` - Item to be substituted into the internationalized string.
    `original` - The problem which ultimately caused this error.

### JavaTestError

    public JavaTestError(I18NResourceBundle i18n,
                         java.lang.String key,
                         java.lang.Object[] args,
                         java.lang.Throwable original)

  Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown. The original throwable will probably be something like an IOException object.

  Parameters:
    `i18n` - The resource bundle to get the message text from.
    `key` - The key to access the resource bundle.
    `args` - Items to be substituted into the internationalized string.
    `original` - The problem which ultimately caused this error.

Method Detail

### printStackTrace

    public void printStackTrace()

  Overrides:
    `printStackTrace` in class `java.lang.Throwable`

### printStackTrace

    public void printStackTrace(java.io.PrintStream s)

  Overrides:
    `printStackTrace` in class `java.lang.Throwable`

### printStackTrace

    public void printStackTrace(java.io.PrintWriter s)

  Overrides:
    `printStackTrace` in class `java.lang.Throwable`

### getOriginalFault

    public java.lang.Throwable getOriginalFault()

  If available, find out what error or exception caused JT Harness to create this object and to throw it.

  Returns:
    The original Throwable object that this object was created in response to. May be null if there was none.

### unexpectedException

    public static void unexpectedException(java.lang.Throwable t)

  Print out a message when an unexpected exception has been caught.

  Parameters:
    `t` - The exception that was caught.
  See Also:
    `JavaTestError(Throwable)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.