com.ibm.mashups.livetext
Interface Exception
public Exception
This API defines the exception which can be thrown by the semantic services during the parsing and processing An exceptionId should identify the current exception. It is a 7 character long string which uniquely identifies the current abnormal condition of the parsing and processing.
Constructor Summary |
constructor(String exceptionId,
Object variable)
Create new instance of livetext service exception. |
Method Summary |
String |
getMessage(String[] locales)
Retrieve locale specific description by using the status code. |
constructor
public constructor(String exceptionId,
Object variable)
-
Create new instance of livetext service exception.
- Parameters:
exceptionId
-
The exception identifier. Must not be null
.variable
-
The list of the parameters to describe this error condition. May be null
. This object must hold all the necessary values to populate the exception message. For example, a message may be defined as the following: "The node ${id} does not have the necessary attribute ${attribute} or the attribute has unrecongnized values." When an exception is throw, the variable object should have members namded "id" and "attribute" respectively. Here is an example of such object throw new com.ibm.mashups.livetext.exception('E000001',
{
'id':100, 'attribute':'DeJaWu'});
getMessage
String getMessage(String[] locales)
-
Retrieve locale specific description by using the status code. This method should not cause any exception. If no locale specific message is found, then an empty string will be returned.
- Parameters:
locales
-
The list of the locales which the locale specific error should be looked up. May be null
.
- Returns:
-
The locale specific exception message.
Copyright IBM Corp. 2010 All Rights Reserved.