Class NetricsErrorItem
- java.lang.Object
-
- com.netrics.likeit.NetricsErrorItem
-
- All Implemented Interfaces:
java.io.Serializable
public final class NetricsErrorItem extends java.lang.Object implements java.io.SerializableHold and provide access to detailed error information.These objects are generated by NetricsException objects. For known error item types this provides a means of accessing parsed out items from the detailed information. Which information is available will depend on the error item type.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intTYPE_NULLIndicates this error item contains no information.static intTYPE_TRANIDIndicates this error item contains a transaction id.static intTYPE_UNKNOWNIndicates this error item contains uncategorized information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDetailsMsg()Return the error details message.intgetItemType()Returns the type of the error item, one of NetricsErrorItem.TYPE_*.intgetTranId()Return the full transaction id.
-
-
-
Field Detail
-
TYPE_NULL
public static final int TYPE_NULL
Indicates this error item contains no information.- See Also:
- Constant Field Values
-
TYPE_UNKNOWN
public static final int TYPE_UNKNOWN
Indicates this error item contains uncategorized information.- See Also:
- Constant Field Values
-
TYPE_TRANID
public static final int TYPE_TRANID
Indicates this error item contains a transaction id.- See Also:
- Constant Field Values
-
-
Method Detail
-
getItemType
public int getItemType()
Returns the type of the error item, one of NetricsErrorItem.TYPE_*.The type of the error item will determine which access methods are valid.
- Returns:
- one of NetricsErrorItem.TYPE_*.
-
getTranId
public int getTranId() throws java.lang.IllegalStateExceptionReturn the full transaction id.This is valid only for TYPE_TRANID. If this is not a TYPE_TRANID error item a IllegalStateException is thrown.
- Returns:
- the full transaction id.
- Throws:
java.lang.IllegalStateException
-
getDetailsMsg
public java.lang.String getDetailsMsg()
Return the error details message.If this error item contains an error details message this returns the message. Otherwise it returns null. This is valid for all error item types.
A detailed error message is returned by many different error cases. The message may be important in helping to debug the cause of an error. When contacting TIBCO about an error any detailed error message in the exception should be reported.
- Returns:
- the error details message.
-
-