com.tibco.tea.agent.support

## Class TeaException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.tibco.tea.agent.support.TeaException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    TeaConnectionObjectNeededException, TeaIllegalArgumentException, TeaIllegalStateException

      public class TeaException
      extends RuntimeException

  Exception that can be thrown from the operations created by the agent extender. The HTTP status code used for indicating this exception is 550. Agent extender can specify the following while throwing the exception: message, details, cause. The message and details are transfered to the server. The cause is logged in the agent logs. The default UI implementation will display the message returned to the server. The details would be hidden by default.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TeaException(String message)` Constructs a TeaException
    `TeaException(String message, int exitCode)` Constructs a TeaException
    `TeaException(String message, String details)` Constructs a TeaException
    `TeaException(String message, String details, int exitCode)` Constructs a TeaException
    `TeaException(String message, String details, Throwable cause)` Constructs a TeaException
    `TeaException(String message, String details, Throwable cause, int exitCode)` Constructs a TeaException

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDetails()` Detailed message.
    `int` | `getExitCode()`
    `int` | `getStatusCode()`
    `String` | `toString()`
    `TeaException` | `withHttpStatusCode(int statusCode)`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TeaException

          public TeaException(String message,
                              String details,
                              Throwable cause,
                              int exitCode)

      Constructs a TeaException
      Parameters:
        `message` - message describing the exception
        `details` - details of what caused the exception
        `cause` - the exception which is being wrapped with this TeaException
        `exitCode` - the Unix exit code to be returned when executed via ssh

    - #### TeaException

          public TeaException(String message,
                              String details,
                              Throwable cause)

      Constructs a TeaException
      Parameters:
        `message` - message describing the exception
        `details` - details of what caused the exception
        `cause` - the exception which is being wrapped with this TeaException

    - #### TeaException

          public TeaException(String message,
                              String details)

      Constructs a TeaException
      Parameters:
        `message` - message describing the exception
        `details` - details of what caused the exception

    - #### TeaException

          public TeaException(String message,
                              String details,
                              int exitCode)

      Constructs a TeaException
      Parameters:
        `message` - message describing the exception
        `details` - details of what caused the exception
        `exitCode` - the Unix exit code to be returned when executed via ssh

    - #### TeaException

          public TeaException(String message,
                              int exitCode)

      Constructs a TeaException
      Parameters:
        `message` - message describing the exception
        `exitCode` - the Unix exit code to be returned when executed via ssh

    - #### TeaException

          public TeaException(String message)

      Constructs a TeaException
      Parameters:
        `message` - message describing the exception

  - ### Method Detail

    - #### getDetails

          public String getDetails()

      Detailed message. Hidden by default, could include stack trace.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Throwable`

    - #### getExitCode

          public int getExitCode()

      Returns:
        the exitCode

    - #### withHttpStatusCode

          public final TeaException withHttpStatusCode(int statusCode)

    - #### getStatusCode

          public final int getStatusCode()

Copyright © 2022 TIBCO Software Inc.. All Rights Reserved.