Class TdbException

  • All Implemented Interfaces:
    java.io.Serializable

    public class TdbException
    extends java.lang.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:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int COMMUNICATIONS_ERROR
      Communications failure talking to the server
      static int END_OF_DATA
      When iterating through a collection, the end of the collection has been reached.
      static int GENERAL_ERROR
      Unspecified error in operation.
      static int INVALID_ARGS
      Programmer error, invalid arguments provided to a method call.
      static int NO_LICENSE
      TRIPjxp is not licensed for use.
      static int NOT_LOGGED_IN
      No user has logged in to the session yet.
      static int NOT_SUPPORTED
      The method or property is not supported for the class on which it was invoked.
      static int PARSER_ERROR
      XML structure error
      static int TIMEOUT
      The functionality or data being accessed is no longer available due to timeout.
      static int TRANSACTION_CANCELLED
      Xml transaction was cancelled.
      static int UNEXPECTED_RESPONSE
      The server sent back an XML response of an unexpected type
      static int UNEXPECTED_STATE
      The system is in an unexpected state, potentially due to an error in the server
      static 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
      static int VALIDATION_ERROR
      Provided data could not be validated.
    • Constructor Summary

      Constructors 
      Constructor Description
      TdbException​(int code)
      Constructor
      TdbException​(int code, java.lang.String msg)
      Constructor
      TdbException​(int code, java.lang.Throwable cause)
      Constructor
      TdbException​(int code, java.lang.Throwable cause, java.lang.String arg)
      Constructor
      TdbException​(java.lang.String msg)
      Constructor
      TdbException​(java.lang.String msg, java.lang.Throwable cause)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      Retrieve the error code from the exception
      java.lang.String getDebugMessage()
      Retrieve a fully decorated error string; this contains the call stack and all embedded exceptions (and their call stacks).
      java.lang.String getMessage()
      Default message preparation
      java.lang.String getSimpleMessage()
      Retrieve an undecorated error string, i.e. no call stacks.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • 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:
        Constant Field Values
      • COMMUNICATIONS_ERROR

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

        public static final int UNEXPECTED_RESPONSE
        The server sent back an XML response of an unexpected type
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • INVALID_ARGS

        public static final int INVALID_ARGS
        Programmer error, invalid arguments provided to a method call.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • VALIDATION_ERROR

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

        public static final int NO_LICENSE
        TRIPjxp is not licensed for use.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • TIMEOUT

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

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

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

        public static final int GENERAL_ERROR
        Unspecified error in operation.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TdbException

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

        public TdbException​(int code,
                            java.lang.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,
                            java.lang.Throwable cause,
                            java.lang.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,
                            java.lang.String msg)
        Constructor
        Parameters:
        code - Error code
        msg - Message to accompany error, typically TRIP-generated
      • TdbException

        public TdbException​(java.lang.String msg)
        Constructor
        Parameters:
        msg - Error message
      • TdbException

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

      • getCode

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

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

        public java.lang.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 java.lang.String getMessage()
        Default message preparation
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        An undecorated error string