getType()

Retrieve the collaboration exception type from the exception object.

Syntax

String getType()
 

Return values

A String that contains the exception type for the current exception. Compare this string value with one of the following exception-type static variables:
AnyException
Any type of exception. If there are two exception links, one that tests for a specific type of exception and one that tests for AnyException, the link that tests for the specific type of exception is checked first. If the current exception does not match the specific exception, the link that tests for AnyException is processed next.
AttributeException
Attribute access problem. For example, the collaboration called getDouble() on a String attribute or called getString() on a nonexistent attribute.
JavaException
Problem with Java code in the collaboration logic.
ObjectException
Business object passed to a method was invalid or a null object was accessed.
OperationException
Service call was improperly set up and could not be sent.
ServiceCallException
Service call failed. For example, a connector or application is unavailable.
SystemException
InterChange Server Express internal error.
TransactionException
Error related to the transactional behavior of a transactional collaboration. For example, rollback failed or the collaboration could not apply compensation.

Notes

The getType() method retrieves the exception type from the current exception. The exception type is a String that identifies the cause of the exception.

Examples

The following example retrieves the collaboration exception type and uses it in a call to the raiseException() method.

String problem currentException.getType();
 raiseException(problem, 1234);
 

Copyright IBM Corp. 2003, 2004