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

## com.novell.nds.dirxml.driver.delimitedtext
Class StatusException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              com.novell.nds.dirxml.driver.delimitedtext.StatusException

All Implemented Interfaces:
  java.io.Serializable

public class StatusException
extends java.lang.Exception

This exception can be thrown by Delimited Text driver extensions to indicate that an error has occurred in the extension. When `StatusException` is caught by the driver, it generates a `status` document that gets sent to the DirXML engine and logged to the DSTrace utility and the DirXML logging facility.

Note that if your intention is just to print a message to the DSTrace utility, you can use the Tracer object that is passed to the extension's init method rather than throwing an exception.

See Also:
  Serialized Form

Field Summary
`static int` | `STATUS_ERROR` Used to report that a non-fatal error has occurred in the `Extension`.
`static int` | `STATUS_FATAL` Used to report that a fatal error has occurred and that the driver should shut down.
`static int` | `STATUS_WARNING` Used to warn that a non-fatal condition has occurred in the `Extension`.

Constructor Summary
`StatusException(int statusLevel, java.lang.String message)` Creates a `StatusException` object used to indicate to the driver that an error has occurred in the extension.

Method Summary
`int` | `getStatusLevel()` Returns the `statusLevel` value that was passed into the constructor.

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
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### STATUS_WARNING

    public static final int STATUS_WARNING

  Used to warn that a non-fatal condition has occurred in the `Extension`. The resulting status document causes a yellow message to be written to the DSTrace utility.

  See Also:
    Constant Field Values

### STATUS_ERROR

    public static final int STATUS_ERROR

  Used to report that a non-fatal error has occurred in the `Extension`. The resulting status document causes a red message to be written to the DSTrace utility. Note that when a regular `Exception` object is thrown from an extension, it also results in a status document being created with this statusLevel.

  See Also:
    Constant Field Values

### STATUS_FATAL

    public static final int STATUS_FATAL

  Used to report that a fatal error has occurred and that the driver should shut down. The resulting status document causes a red message to be written to the DSTrace utility and causes the driver to shut down. Note that any `StatusException` or `Exception` that is thrown from the `init` method of an `Extension` automatically gets promoted to a `StatusException` with `statusLevel` set to `STATUS_FATAL`.

  See Also:
    Constant Field Values

Constructor Detail

### StatusException

    public StatusException(int statusLevel,
                           java.lang.String message)

  Creates a `StatusException` object used to indicate to the driver that an error has occurred in the extension.

Parameters:
  `statusLevel` - You must set this to either `STATUS_WARNING`, `STATUS_ERROR`, or `STATUS_FATAL`
  `message` - A descriptive message describing the error that occurred.

Method Detail

### getStatusLevel

    public int getStatusLevel()

  Returns the `statusLevel` value that was passed into the constructor.

  Returns:
    statusLevel either `STATUS_WARNING`, `STATUS_ERROR`, or `STATUS_FATAL`

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