|
14.1 What is Error Code Customization?
14.1 What is Error Code Customization?
Using this feature of the TL1 Agent, you can customize the error codes and their descriptions that are received by the manager as response. This feature is available only in Standalone TL1 Agents.
You can send standard error codes defined in TL1Errors.java or your own error codes.
If you want to send an error response to the manager, you can throw a TL1AgentException from within the doAction() method of the generated stub files.
There are two constructors provided for this.
14.2.1 Sending Standard Error Codes
Using the first constructor, standard errors defined in the class TL1Errors.java can be sent as error codes. Refer to the JavaDocs for the static codes defined and their description.
E.g., throw new TL1AgentException("Invalid Access Identifier", TL1Errors.IIAC);
The error message received appears as follows:
|
localhost 2001-07-19 16:37:35 M 3 DENY IIAC "INVALID ACCESS IDENTIFIER" ; |
14.2.2 Sending Your Own Error Code
Using the second constructor, you can send your own error code and description.
E.g., throw new TL1AgentException("Unable to proceed further", "AUTP", "UNABLE TO PROCEED");
The received error message looks like the following:
|
localhost 2001-07-19 16:37:35 M 3 DENY AUTP "UNABLE TO PROCEED" ; |
|