com.ibm.xcap
Class XcapException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ibm.xcap.XcapException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InvalidNodeSelectorException

public class XcapException
extends java.lang.Exception

XCAP Exception Class

See Also:
Serialized Form

Constructor Summary
XcapException()
          Constructs a new XCAP exception
XcapException(java.lang.String message)
          Constructs a new XCAP exception with the specified message
XcapException(java.lang.String message, java.lang.Throwable rootCause)
          Constructs a new XCAP exception when the XCAP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message
XcapException(java.lang.Throwable rootCause)
          Constructs a new XCAP exception when the XCAP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation.
 
Method Summary
static java.lang.String createLocalizedMessage(java.lang.String messageKey, java.lang.Object[] params, java.lang.String resourceBundle)
          Creates a localized message.
static XcapException createLocalizedXCAPException(java.lang.String messageKey, java.lang.Object[] params, java.lang.String resourceBundle, java.lang.Throwable rootCause)
          Creates an XCAPException with a localized message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XcapException

public XcapException()
Constructs a new XCAP exception


XcapException

public XcapException(java.lang.String message)
Constructs a new XCAP exception with the specified message

Parameters:
message - a String specifying the text of the exception message

XcapException

public XcapException(java.lang.String message,
                     java.lang.Throwable rootCause)
Constructs a new XCAP exception when the XCAP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message

Parameters:
message - a String specifying the text of the exception message
rootCause - the Throwable exception that interfered with the XCAP's normal operation, making this XCAP exception necessary

XcapException

public XcapException(java.lang.Throwable rootCause)
Constructs a new XCAP exception when the XCAP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. The exception's message is based on the localized message of the underlying exception.
This method calls the getLocalizedMessage method on the Throwable exception to get a localized exception message.

Parameters:
rootCause - the Throwable exception that interfered with the XCAP's normal operation, making this XCAP exception necessary
Method Detail

createLocalizedXCAPException

public static XcapException createLocalizedXCAPException(java.lang.String messageKey,
                                                         java.lang.Object[] params,
                                                         java.lang.String resourceBundle,
                                                         java.lang.Throwable rootCause)
Creates an XCAPException with a localized message. This method will construct the XCAPException using the following method if a root cause is available:

XCAPException(String message, Throwable rootCause)

This method will use the following method if the rootCause is null:

XCAPException(String message)

Parameters:
messageKey - Message Key for the message in the resource bundle
params - Optional array of parameters, pass null if there are none
resourceBundle - Resource Bundle to retreive the message from
rootCause - the Throwable exception that interfered with the XCAP's normal operation, making this XCAP exception necessary
Returns:
XCAPExeption with the localized message
See Also:
XcapException(String, Throwable), XcapException(String)

createLocalizedMessage

public static java.lang.String createLocalizedMessage(java.lang.String messageKey,
                                                      java.lang.Object[] params,
                                                      java.lang.String resourceBundle)
Creates a localized message. This method will construct the localized message based on the parameters below

Parameters:
messageKey - Message Key for the message in the resource bundle
params - Optional array of parameters, pass null if there are none
resourceBundle - Resource Bundle to retreive the message from
Returns:
String with the localized message