Class TdbException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.tietoenator.trip.jxp.TdbException
All Implemented Interfaces:
Serializable

public class TdbException extends Exception
All exceptions thrown by this class library conform to this type. An exception may well have one or more other exceptions contained within it.
See Also:
  • Field Details

    • UNEXPECTED_STATE

      public static final int UNEXPECTED_STATE
      The system is in an unexpected state, potentially due to an error in the server
      See Also:
    • COMMUNICATIONS_ERROR

      public static final int COMMUNICATIONS_ERROR
      Communications failure talking to the server
      See Also:
    • UNEXPECTED_RESPONSE

      public static final int UNEXPECTED_RESPONSE
      The server sent back an XML response of an unexpected type
      See Also:
    • PARSER_ERROR

      public static final int PARSER_ERROR
      XML structure error
      See Also:
    • UNUSABLE_SESSION

      public static final int UNUSABLE_SESSION
      Attempt to use an object with a session of an incompatible type, for example attempting to use grid objects on a TRIPnet connection
      See Also:
    • INVALID_ARGS

      public static final int INVALID_ARGS
      Programmer error, invalid arguments provided to a method call.
      See Also:
    • END_OF_DATA

      public static final int END_OF_DATA
      When iterating through a collection, the end of the collection has been reached.
      See Also:
    • VALIDATION_ERROR

      public static final int VALIDATION_ERROR
      Provided data could not be validated.
      See Also:
    • NO_LICENSE

      public static final int NO_LICENSE
      TRIPjxp is not licensed for use.
      See Also:
    • NOT_SUPPORTED

      public static final int NOT_SUPPORTED
      The method or property is not supported for the class on which it was invoked.
      See Also:
    • TIMEOUT

      public static final int TIMEOUT
      The functionality or data being accessed is no longer available due to timeout.
      See Also:
    • NOT_LOGGED_IN

      public static final int NOT_LOGGED_IN
      No user has logged in to the session yet.
      See Also:
    • TRANSACTION_CANCELLED

      public static final int TRANSACTION_CANCELLED
      Xml transaction was cancelled.
      See Also:
    • GENERAL_ERROR

      public static final int GENERAL_ERROR
      Unspecified error in operation.
      See Also:
  • Constructor Details

    • TdbException

      public TdbException(int code)
      Constructor
      Parameters:
      code - Error code
    • TdbException

      public TdbException(int code, Throwable cause)
      Constructor
      Parameters:
      code - Error code
      cause - Embedded exception, i.e. the exception that caused this TdbException to be thrown
    • TdbException

      public TdbException(int code, Throwable cause, String arg)
      Constructor
      Parameters:
      code - Error code
      cause - Embedded exception, i.e. the exception that caused this TdbException to be thrown
      arg - Optional argument, e.g. location data
    • TdbException

      public TdbException(int code, Throwable cause, String msg, String logexcerpt)
      Constructor
      Parameters:
      code - Error code
      cause - Embedded exception, i.e. the exception that caused this TdbException to be thrown
      msg - Message to accompany error, typically TRIP-generated
      logexcerpt - API log excerpt from TRIPsystem related to the thrown exception
    • TdbException

      public TdbException(int code, String msg)
      Constructor
      Parameters:
      code - Error code
      msg - Message to accompany error, typically TRIP-generated
    • TdbException

      public TdbException(String msg)
      Constructor
      Parameters:
      msg - Error message
    • TdbException

      public TdbException(String msg, Throwable cause)
      Constructor
      Parameters:
      msg - Error message
      cause - Embedded exception, i.e. the exception that caused this TdbException to be thrown
  • Method Details

    • getCode

      public int getCode()
      Retrieve the error code from the exception
      Returns:
      The error code
    • getSimpleMessage

      public String getSimpleMessage()
      Retrieve an undecorated error string, i.e. no call stacks.
      Returns:
      The undecorated error string.
    • getDebugMessage

      public String getDebugMessage()
      Retrieve a fully decorated error string; this contains the call stack and all embedded exceptions (and their call stacks). This is useful for producing a string for transmission to clients in a single call.
      Returns:
      The fully decorated error string
    • getMessage

      public String getMessage()
      Default message preparation
      Overrides:
      getMessage in class Throwable
      Returns:
      An undecorated error string
    • getLogExcerpt

      public String getLogExcerpt()
      TRIPsystem API log excerpt related to the thrown exception.

      If session-specific server-side API logging is enabled this property will contain an excerpt from the TRIPsystem API for the associated TRIPjxp call.

      Returns:
      API log excerpt, or an empty string if none is available.