com.sapportals.connector

Class ConnectorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.resource.ResourceException
              extended by com.sapportals.connector.ConnectorException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AttributeNotFoundException, CapabilityNotFoundException, CapabilityNotSupportedException, ConnectionClosedException, ConnectionFailedException, ElementNotFoundException, ExecutionException, FieldNotFoundException, FunctionNotFoundException, IndexNotFoundException, InterfaceNotSupportedException, InvalidQueryException, MethodNotFoundException, ParameterNotFoundException, RelationNotFoundException, TimeoutException

public class ConnectorException
extends ResourceException

The base connector exception. Used whenever a exception in the underlying API occurs. The underlying exception is available throw the getLinkedException() method. This exception overrides getLocalizedMessage() which returns a message localized for current user locale

See Also:
Serialized Form

Field Summary
 String localizedMessage
           
 
Constructor Summary
ConnectorException(String message)
          Creates a new ConnectorException object.
ConnectorException(String message, String localizedString)
           
ConnectorException(String message, Throwable cause)
          Constructs a new throwable with the specified detail message and cause
 
Method Summary
 String getLocalizedMessage()
           
 String toString()
          We need to override Throwable.toString() because it uses getLocalizedMessage() instead of ResourceException.getMessage() as specified in javadoc.
 
Methods inherited from class javax.resource.ResourceException
getErrorCode, getLinkedException, getMessage, setErrorCode, setLinkedException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

localizedMessage

public final String localizedMessage
Constructor Detail

ConnectorException

public ConnectorException(String message)
Creates a new ConnectorException object.

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.

ConnectorException

public ConnectorException(String message,
                          Throwable cause)
Constructs a new throwable with the specified detail message and cause

Parameters:
message - the detail message
cause - a chained exception of type Throwable

ConnectorException

public ConnectorException(String message,
                          String localizedString)
Method Detail

getLocalizedMessage

public String getLocalizedMessage()
Overrides:
getLocalizedMessage in class Throwable

toString

public String toString()
We need to override Throwable.toString() because it uses getLocalizedMessage() instead of ResourceException.getMessage() as specified in javadoc. toString() in turn is used in Throwable.printStackTrace() which would show localized message in the log otherwise.

Overrides:
toString in class Throwable
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/connectivityfw/api api EP-PIN
[sap.com] FRAMEWORK-EXT [sap.com] tc/conn/connectorframeworkdeprecated default EP-CON-CF
[sap.com] FRAMEWORK-EXT [sap.com] tc/conn/connectorframeworkdeprecated - EP-CON-CF


Copyright 2012 SAP AG Complete Copyright Notice