Previous Topic: Result Class

Next Topic: Core Methods in the Result Class

Interpret a Result Object

Each result object and its Facility/Severity/Status combination are represented by a unique value. These unique values are associated with predefined constants defined in the SmApiResult class—for example, SERVER_CONFIGURATION_FAILURE.

To determine the Facility/Severity/Status information for a result, you can call the equals() method to compare the returned SmApiResult object with the result constants.

You can output a result object as a string—for example, you can generate a result string by calling toString() on the SmApiResult object.

A result string has five space-separated name/value pairs in the following format:

[facility=facility severity=severity reason=reason
status=statusCode message=message]

For example, suppose you call toString() for an SmApiResult object that occurs because a user attempted to create a password with fewer than the minimum number of alphabetic characters. The method might return a result string that looks like this:

[facility=4 severity=3 reason=1008 status=13 message=nArg=1,Arg1=3]

The fields in the result have the following meanings: