Class 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:
  • 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 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 Details

    • 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