Skip navigation links


Thor.API.Exceptions
Class tcAPIException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.thortech.xl.util.ThorException
              extended by Thor.API.Exceptions.tcAPIException

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class tcAPIException
extends com.thortech.xl.util.ThorException
implements java.lang.Cloneable

This is generic exception raised while using API operations. For example if there is a problem while retrieving the information from the database this exception is raised.

See Also:
Serialized Form

Field Summary
 java.lang.String isMessage
          The detailed message.
 java.lang.String isSeverity
           

 

Constructor Summary
tcAPIException()
          Creates a new tcAPIException object.
tcAPIException(java.lang.String isMessage)
          Constructs a new tcAPIException with the specified detail message.
tcAPIException(java.lang.String errorCode, java.lang.String isMessage)
          Constructs a new tcAPIException with the specified error code and detail message.
tcAPIException(java.lang.String isMessage, java.lang.Throwable ex)
           

 

Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.The method clone performs a specific cloning operation, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown.
 java.lang.String getAction()
           
 java.lang.String getErrorCode()
          Returns the error code associated with API exception
 java.lang.String getMessage()
          Returns the error message associated with API exception
 java.lang.Object getReturnValue()
          Returns the object that needed to be returned by the API when the API exception occurred.
 java.lang.String getSeverity()
          Returns the Severity of error message associated with API exception
 void setAction(java.lang.String isAction)
           
 void SetErrorCode(java.lang.String code)
          Method to set the Error code on API Exception
 void SetMessage(java.lang.String message)
          Method to set the Error message on API Exception
 void setReturnValue(java.lang.Object retval)
          Stores the return value that the API intended to send back when a API exception occurred by the failing of some of the transactions
 void setSeverity(java.lang.String severity)
          Method to set the Severity of Error message on API Exception

 

Methods inherited from class com.thortech.xl.util.ThorException
getOriginalCause, setCause

 

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

isMessage

public java.lang.String isMessage
The detailed message. The detailed message is saved for later retrieval by the Throwable.getMessage() method.

isSeverity

public java.lang.String isSeverity

Constructor Detail

tcAPIException

public tcAPIException()
Creates a new tcAPIException object.

tcAPIException

public tcAPIException(java.lang.String isMessage)
Constructs a new tcAPIException with the specified detail message.
Parameters:
isMessage - the detailed message. The detailed message is saved for later retrieval by the Throwable.getMessage() method.

tcAPIException

public tcAPIException(java.lang.String errorCode,
                      java.lang.String isMessage)
Constructs a new tcAPIException with the specified error code and detail message.
Parameters:
errorCode - the error code
isMessage - the detailed message. The detailed message is saved for later retrieval by the Throwable.getMessage() method.

tcAPIException

public tcAPIException(java.lang.String isMessage,
                      java.lang.Throwable ex)

Method Detail

setReturnValue

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

getReturnValue

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

clone

public java.lang.Object clone()
Creates and returns a copy of this object.The method clone performs a specific cloning operation, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown.
Overrides:
clone in class java.lang.Object
Returns:
java.lang.Object
Throws:
java.lang.Error - Error if any of the components cannot be cloned

SetErrorCode

public void SetErrorCode(java.lang.String code)
Method to set the Error code on API Exception
Parameters:
code, - error code to be set

getErrorCode

public java.lang.String getErrorCode()
Returns the error code associated with API exception
Returns:
the error code associated with the exception

SetMessage

public void SetMessage(java.lang.String message)
Method to set the Error message on API Exception
Parameters:
message, - error message to be set

getMessage

public java.lang.String getMessage()
Returns the error message associated with API exception
Overrides:
getMessage in class java.lang.Throwable
Returns:
the error message associated with the exception

setSeverity

public void setSeverity(java.lang.String severity)
Method to set the Severity of Error message on API Exception
Parameters:
severity, - severity of error message to be set
Since:
9.1

getSeverity

public java.lang.String getSeverity()
Returns the Severity of error message associated with API exception
Returns:
the severity of error message associated with the exception
Since:
9.1

getAction

public java.lang.String getAction()

setAction

public void setAction(java.lang.String isAction)

Skip navigation links


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.