SiteMinder
Java SDK r12.52sp1


com.netegrity.sdk.apiutil
Class SmApiException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.netegrity.sdk.apiutil.SmApiException
All Implemented Interfaces:
java.io.Serializable

public class SmApiException
extends java.lang.Exception

The SiteMinder API exception is thrown by the Utilities, Delegated Management, and Policy Management packages.

Apart from the message string, SmApiException holds the SmApiResult object. Through SmApiResult, you can retrieve the facility, severity, and status related to the exception.

Since:
SDK 2.0
See Also:
Serialized Form

Constructor Summary
SmApiException(SmApiResult apiResult)
          Constructs a SmApiException with the specified SmApiResult.
 
Method Summary
 void appendAdditionalInformation(java.lang.String info)
          Add additional text information to the exception.
 SmApiResult getApiResult()
          Gets an API result.
 int getFacility()
          Gets the facility code of the exception.
 int getReason()
          Gets the reason code of the exception.
 int getSeverity()
          Gets the severity code of the exception.
 int getStatus()
          Gets the status code of the exception.
 java.lang.String toString()
          Returns a string representation of the SmApiResult object in the form of a set of entries separated by the ASCII space character.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmApiException

public SmApiException(SmApiResult apiResult)
Constructs a SmApiException with the specified SmApiResult.

Parameters:
apiResult - SmApiResult pertaining to this exception
Method Detail

getFacility

public int getFacility()
Gets the facility code of the exception.

Returns:
Facility code of the exception.

getSeverity

public int getSeverity()
Gets the severity code of the exception.

Returns:
Severity code of the exception.

getReason

public int getReason()
Gets the reason code of the exception.

Returns:
Reason code of the exception.

getStatus

public int getStatus()
Gets the status code of the exception.

Returns:
Status code of the exception.

toString

public java.lang.String toString()
Returns a string representation of the SmApiResult object in the form of a set of entries separated by the ASCII space character. The entire set of entries is enclosed in braces ( [ ] ).
The format is as follows:
[facility=facility severity=severity reason=reason status=statusCode message=message]

If there is additional information in the exception, it follows the SmApiResult block, with a newline separating it.

Overrides:
toString in class java.lang.Throwable

getApiResult

public SmApiResult getApiResult()
Gets an API result.

Returns:
SmApiResult

appendAdditionalInformation

public void appendAdditionalInformation(java.lang.String info)
Add additional text information to the exception. This can be called many times, each time appending the new info to the end of the additional information set.

Parameters:
info - The additional information to append to the exception.

SiteMinder
Java SDK r12.52sp1

Wed 03/19/2014

http://ca.com
Copyright (c) 2014 CA.