Class tcBulkException

java.lang.Object
java.lang.Throwable
java.lang.Exception
Thor.API.Exceptions.tcBulkException
All Implemented Interfaces:
Serializable, Cloneable

public final class tcBulkException extends Exception implements Cloneable
This exception is raised whenever a bulk operation is called and the operation is only successfull on some of the bulk transactions. If this happens, a tcBulkOperation is raise and the keys that failed are stored in isKeys with their respective error messages in isErrorMessages. In Addition, if the operation returned information back, that information can be set in the using setReturnValue by the API. The caller will need to get the return value and cast it to the respective object based on the information about the API that is called.
Since:
7.2
Version:
1.2
Author:
Mario Lim
See Also:
  • Field Details

    • isMessage

      public String isMessage
      The message of this exception
    • isKeys

      public String[] isKeys
      Array of keys that failed the operation
    • isErrorMessages

      public String[] isErrorMessages
      Corresponding error messages for each of the keys that failed the operation
    • errorCodes

      public String[] errorCodes
    • isSeverity

      public String[] isSeverity
  • Constructor Details

    • tcBulkException

      public tcBulkException()
      Creates a new tcBulkException object.
    • tcBulkException

      public tcBulkException(String isMessage, String[] isKeys, String[] isErrorMessages)
      Creates a new tcBulkException object.
      Parameters:
      isMessage - The generic message for this exception
      isKeys - array of keys that failed the operation
      isErrorMessages - array of messages corresponding to the keys that failed the operation
    • tcBulkException

      public tcBulkException(String isMessage, String[] isKeys, String[] isErrorMessages, String[] errorCodes)
    • tcBulkException

      public tcBulkException(String isMessage, String[] isKeys, String[] isErrorMessages, String[] errorCodes, String[] severity)
      Creates a new tcBulkException object.
      Parameters:
      isMessage - The generic message for this exception
      isKeys - array of keys that failed the operation
      isErrorMessages - array of messages corresponding to the keys that failed the operation
      errorCodes - array of error codes corresponding to the keys that failed the operation
      severity - array of severity level corresponding to the keys that failed the operation
      Since:
      9.1
  • Method Details

    • getErrorCodes

      public String[] getErrorCodes()
    • setReturnValue

      public void setReturnValue(Object retval)
      Stores the return value that the API intended to send back when a bulk exception occurred by the failing of some of the transactions
      Parameters:
      retval - the object that needs to be returned
      Since:
      8.0
    • getReturnValue

      public Object getReturnValue()
      Returns the object that needed to be returned by the API when the bulk exception occurred.
      Returns:
      an Object that need to be casted depending on the return value of the API that caused the bulk exception to happen
      Since:
      8.0
    • clone

      public Object clone()
      Clone method
      Returns:
      the clone of this bulk exception
      Throws:
      Error - Error if any of the components cannot be cloned.