com.sap.mw.jco
Class JCO.J2EEAbapException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.sap.mw.jco.JCO.J2EEAbapException
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
JCO

public static class JCO.J2EEAbapException
extends java.lang.Exception

A convenience class that wraps a JCO.AbapException. This can be used to throw AbapException in J2EE compliant servers which do not allow runtime exception to be thrown. This class ensures that a J2EE server sends the message key back to the SAP system while all other exceptions might get caught by J2EE containers.

See Also:
Serialized Form

Constructor Summary
JCO.J2EEAbapException(JCO.AbapException ex)
          Create a new instance of the J2EEAbapException
JCO.J2EEAbapException(java.lang.String key)
          Create a new instance of the J2EEAbapException
JCO.J2EEAbapException(java.lang.String key, java.lang.String message)
          Create a new instance of the J2EEAbapException
 
Method Summary
 JCO.AbapException getAbapException()
          Returns the original JCO.AbapException
 int getGroup()
          Returns the error group constant JCO_ERROR_ABAP_EXCEPTION
 java.lang.String getKey()
          Returns the error key
 java.lang.String toString()
          Returns a short description of this error
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JCO.J2EEAbapException

public JCO.J2EEAbapException(JCO.AbapException ex)
Create a new instance of the J2EEAbapException
Parameters:
ex - the original JCO.AbapException

JCO.J2EEAbapException

public JCO.J2EEAbapException(java.lang.String key)
Create a new instance of the J2EEAbapException
Parameters:
key - the name of the exception as defined in the function module

JCO.J2EEAbapException

public JCO.J2EEAbapException(java.lang.String key,
                             java.lang.String message)
Create a new instance of the J2EEAbapException
Parameters:
key - the name of the exception as defined in the function module
message - the message text
Method Detail

getAbapException

public final JCO.AbapException getAbapException()
Returns the original JCO.AbapException
Returns:
the original JCO.AbapException

getGroup

public final int getGroup()
Returns the error group constant JCO_ERROR_ABAP_EXCEPTION
Returns:
the error group

getKey

public final java.lang.String getKey()
Returns the error key
Returns:
the error key

toString

public java.lang.String toString()
Returns a short description of this error
Overrides:
toString in class java.lang.Throwable
Returns:
a string representaion of this JCO.J2EEAbapException.