Package com.sap.conn.jco
Class AbapClassException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.sap.conn.jco.JCoException
com.sap.conn.jco.AbapClassException
- All Implemented Interfaces:
Serializable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
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_CBRFC_SERIALIZE, JCO_ERROR_CHECK_SESSION, 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_SERIALIZATION, JCO_ERROR_SERVER_ACCESS_DENIED, 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
ConstructorsConstructorDescriptionAbapClassException
(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
Modifier and TypeMethodDescriptionCreates a String representation of the call stack of the AbapClassException, which is understood by an ABAP system.Creates a string representation of additional information related to the AbapClassException.Returns the class name of this ABAP class exception.Returns the remote context of this ABAP class exception.Returns the instance ofJCoAbapObject
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
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
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 objectremoteContext
- The remote context contains information about the server system context, in which the exception was thrown.
-
AbapClassException
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
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 Details
-
getClassName
Returns the class name of this ABAP class exception.- Returns:
- the class name of this ABAP class exception
-
toAbapObject
Returns the instance ofJCoAbapObject
that is used by JCo to represent an ABAP class exception.- Returns:
- the object representing the ABAP class exception
-
getRemoteContext
Returns the remote context of this ABAP class exception.- Returns:
- the remote context of this ABAP class exception
-
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
Creates a string representation of additional information related to the AbapClassException.- Returns:
- additional exception information as String
-