org.apache.tuscany.sca.databinding
Interface ExceptionHandler


public interface ExceptionHandler

ExceptionHandler provides databinding-specific logic for exception handling

Version:
$Rev: 537475 $ $Date: 2007-05-12 17:05:29 +0100 (Sat, 12 May 2007) $

Method Summary
 java.lang.Exception createException(DataType<DataType> exceptionType, java.lang.String message, java.lang.Object faultInfo, java.lang.Throwable cause)
          Create an exception to wrap the fault data
 java.lang.Object getFaultInfo(java.lang.Exception exception)
          Retrieve the fault info from a java exception
 DataType<?> getFaultType(DataType exceptionDataType)
          Introspect an exception class to figure out the fault data type
 

Method Detail

createException

java.lang.Exception createException(DataType<DataType> exceptionType,
                                    java.lang.String message,
                                    java.lang.Object faultInfo,
                                    java.lang.Throwable cause)
Create an exception to wrap the fault data

Parameters:
exceptionType - The DataType for the exception
message - The error message
faultInfo - The databinding-specific fault data
cause - The protocol-specific error
Returns:
An instance of java exception to represent the fault

getFaultInfo

java.lang.Object getFaultInfo(java.lang.Exception exception)
Retrieve the fault info from a java exception

Parameters:
exception - The databinding-specific java exception that represents the fault data
Returns:
The databinding-specific fault data

getFaultType

DataType<?> getFaultType(DataType exceptionDataType)
Introspect an exception class to figure out the fault data type

Parameters:
exceptionDataType - The exception class
Returns:
The data type for the fault