com.sap.conn.jco
Class AbapClassException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sap.conn.jco.JCoException
              extended by com.sap.conn.jco.AbapClassException
All Implemented Interfaces:
Serializable

public class AbapClassException
extends JCoException

This class represents an ABAP class exception. Using class exceptions with connectors is supported for ABAP systems from 7.20 onwards.

Since:
JCo 3.0.3
See Also:
Serialized Form

Nested Class Summary
static class AbapClassException.Mode
          The Mode enumeration describes how class exceptions should be handled by a server system.
 
Field Summary
 
Fields inherited from class com.sap.conn.jco.JCoException
JCO_ERROR_ABAP_CLASS_EXCEPTION, JCO_ERROR_ABAP_EXCEPTION, JCO_ERROR_APPLICATION_EXCEPTION, JCO_ERROR_CANCELLED, JCO_ERROR_COMMUNICATION, JCO_ERROR_CONCURRENT_CALL, JCO_ERROR_CONFIGURATION, JCO_ERROR_CONVERSION, JCO_ERROR_CREATE_SESSION, JCO_ERROR_DATA_PROVIDER_ERROR, JCO_ERROR_DESTINATION_DATA_INVALID, JCO_ERROR_DESTROY_SESSION, JCO_ERROR_DSR_LOAD_ERROR, JCO_ERROR_EXTENSION, JCO_ERROR_FIELD_NOT_FOUND, JCO_ERROR_FUNCTION_NOT_FOUND, JCO_ERROR_ILLEGAL_ARGUMENT, JCO_ERROR_ILLEGAL_STATE, JCO_ERROR_ILLEGAL_TID, JCO_ERROR_INITIALIZATION, JCO_ERROR_INTERNAL, JCO_ERROR_INVALID_HANDLE, JCO_ERROR_INVALID_REPOSITORY_CACHE, JCO_ERROR_JARM_LOAD_ERROR, JCO_ERROR_LOGON_FAILURE, JCO_ERROR_NOT_SUPPORTED, JCO_ERROR_NULL_HANDLE, JCO_ERROR_PASSIVATE_SESSION, JCO_ERROR_PASSWORD_CHANGE_REQUIRED, JCO_ERROR_PROGRAM, JCO_ERROR_PROTOCOL, JCO_ERROR_REGISTRATION_DENIED, JCO_ERROR_REPOSITORY_SERIALIZATION, JCO_ERROR_REQUEST_CANCELLED, JCO_ERROR_RESOURCE, JCO_ERROR_RESTORE_SESSION, JCO_ERROR_SERVER_DATA_INVALID, JCO_ERROR_SERVER_STARTUP, JCO_ERROR_SESSION_REF_NOT_VALID, JCO_ERROR_SHAREABLE_CONTAINER, JCO_ERROR_STATE_BUSY, JCO_ERROR_SYSTEM_FAILURE, JCO_ERROR_TIMEOUT, JCO_ERROR_UNSUPPORTED_CODEPAGE, JCO_ERROR_XML_PARSER
 
Constructor Summary
AbapClassException(Exception javaException)
          Creates an instance of an AbapClassException that represents the Java exception within an CX_REMOTE_APPL_ERROR.
AbapClassException(String message, JCoAbapObject abapObject)
          Creates an instance of an AbapClassException.
AbapClassException(String message, String className, JCoAbapObject abapObject, JCoRemoteContext remoteContext)
          Creates an instance of an AbapClassException.
 
Method Summary
 String createCallStack()
          Creates a String representation of the call stack of the AbapClassException, which is understood by an ABAP system.
 String createExceptionInfo()
          Creates a string representation of additional information related to the AbapClassException.
 String getClassName()
          Returns the class name of this ABAP class exception.
 JCoRemoteContext getRemoteContext()
          Returns the remote context of this ABAP class exception.
 JCoAbapObject toAbapObject()
          Returns the instance of JCoAbapObject that is used by JCo to represent an ABAP class exception.
 
Methods inherited from class com.sap.conn.jco.JCoException
getGroup, getKey, getMessageClass, getMessageNumber, getMessageParameter, getMessageParameters, getMessageText, getMessageType, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbapClassException

public AbapClassException(String message,
                          String className,
                          JCoAbapObject abapObject,
                          JCoRemoteContext remoteContext)
Creates an instance of an AbapClassException. This constructor is used by the JCo runtime, when the ABAP system throws such an exception.

Parameters:
message - The exception message in the current language.
className - The name of the exception class that has been thrown in the ABAP system.
abapObject - The instance of the exception represented as ABAP object
remoteContext - The remote context contains information about the server system context, in which the exception was thrown.

AbapClassException

public AbapClassException(String message,
                          JCoAbapObject abapObject)
Creates an instance of an AbapClassException. This constructor should be used by server applications that want to throw an ABAP class exception.

Parameters:
message - The exception message in the current language.
abapObject - The instance of the exception represented as ABAP object

AbapClassException

public AbapClassException(Exception javaException)
Creates an instance of an AbapClassException that represents the Java exception within an CX_REMOTE_APPL_ERROR. This constructor can be used by server applications that want to throw an ABAP class exception for encapsulating an arbitrary Java exception that occurred somewhere in their application code and which shall be forwarded to ABAP. Thus, the complete Java call stack will be transfered to ABAP.

Parameters:
javaException - The exception that shall be wrapped.
Method Detail

getClassName

public String getClassName()
Returns the class name of this ABAP class exception.

Returns:
the class name of this ABAP class exception

toAbapObject

public JCoAbapObject toAbapObject()
Returns the instance of JCoAbapObject that is used by JCo to represent an ABAP class exception.

Returns:
the object representing the ABAP class exception

getRemoteContext

public JCoRemoteContext getRemoteContext()
Returns the remote context of this ABAP class exception.

Returns:
the remote context of this ABAP class exception

createCallStack

public String createCallStack()
Creates a String representation of the call stack of the AbapClassException, which is understood by an ABAP system.

Returns:
the call stack as a String, which can be interpreted by an ABAP system.

createExceptionInfo

public String createExceptionInfo()
Creates a string representation of additional information related to the AbapClassException.

Returns:
additional exception information as String


Copyright © 2014 SAP. All Rights Reserved.