com.bea.alsb.resources.custom
Class CustomResourceException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.bea.alsb.resources.custom.CustomResourceException
All Implemented Interfaces:
Serializable

public class CustomResourceException
extends Exception

Thrown when error encountered during custom resource creation.

See Also:
Serialized Form

Constructor Summary
CustomResourceException()
          Constructs a CustomResourceException.
CustomResourceException(String msg)
          Constructs a CustomResourceException with the specified message text.
CustomResourceException(String message, Source errorPayload)
           
CustomResourceException(String msg, String errorCode)
          Constructs a CustomResourceException with the specified message text and specified error code
CustomResourceException(String message, Throwable cause)
          Constructs a CustomResourceException with the specified detail message and cause.
CustomResourceException(String message, Throwable cause, String errorCode)
          Constructs a CustomResourceException with the specified detail message and cause and error code.
CustomResourceException(Throwable cause)
          Constructs a CustomResourceException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
CustomResourceException(Throwable cause, String errorCode)
          Constructs a CustomResourceException with the specified cause and error code.
 
Method Summary
 String getErrorCode()
           
 Source getErrorPayload()
           
static CustomResourceException newInstance(Throwable cause)
          Most transport SDK API signatures declare only CustomResourceException to be thrown.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomResourceException

public CustomResourceException()
Constructs a CustomResourceException.


CustomResourceException

public CustomResourceException(String msg)
Constructs a CustomResourceException with the specified message text.

Parameters:
msg - Message text.

CustomResourceException

public CustomResourceException(String msg,
                               String errorCode)
Constructs a CustomResourceException with the specified message text and specified error code

Parameters:
msg - Message text.
errorCode - error code

CustomResourceException

public CustomResourceException(String message,
                               Throwable cause)
Constructs a CustomResourceException with the specified detail message and cause.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

CustomResourceException

public CustomResourceException(String message,
                               Throwable cause,
                               String errorCode)
Constructs a CustomResourceException with the specified detail message and cause and error code.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
errorCode - error code

CustomResourceException

public CustomResourceException(Throwable cause)
Constructs a CustomResourceException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables (for example, PrivilegedActionException).

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

CustomResourceException

public CustomResourceException(Throwable cause,
                               String errorCode)
Constructs a CustomResourceException with the specified cause and error code.

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
errorCode - error code

CustomResourceException

public CustomResourceException(String message,
                               Source errorPayload)
Method Detail

getErrorPayload

public Source getErrorPayload()

getErrorCode

public String getErrorCode()

newInstance

public static CustomResourceException newInstance(Throwable cause)
Most transport SDK API signatures declare only CustomResourceException to be thrown. This utility method will wrap any Transport or non-Transport exception appropriately in a CustomResourceException. Typical usage is

  void someAPI()
     throws CustomResourceException
  {
     try
     {
        ....
     }
     catch (Exception e)
     {
        throw CustomResourceException.newInstance(e);
     }
  }
 

Parameters:
cause - original cause of the exception
Returns:
new CustomResourceException that wraps the original cause