com.sap.mw.jco
Class JCO.Exception

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sap.mw.jco.JCO.Exception
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JCO.AbapException, JCO.ConversionException
Enclosing class:
JCO

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

General JCO exception object. All errors of the implementation will be thrown using this class.

See Also:
Serialized Form

Field Summary
static int JCO_ERROR_ABAP_EXCEPTION
           
static int JCO_ERROR_APPLICATION_EXCEPTION
           
static int JCO_ERROR_CANCELLED
           
static int JCO_ERROR_COMMUNICATION
           
static int JCO_ERROR_CONVERSION
           
static int JCO_ERROR_FIELD_NOT_FOUND
           
static int JCO_ERROR_FUNCTION_NOT_FOUND
           
static int JCO_ERROR_ILLEGAL_ARGUMENT
           
static int JCO_ERROR_ILLEGAL_TID
           
static int JCO_ERROR_INTERNAL
           
static int JCO_ERROR_LOGON_FAILURE
           
static int JCO_ERROR_NOT_SUPPORTED
           
static int JCO_ERROR_NULL_HANDLE
           
static int JCO_ERROR_PROGRAM
           
static int JCO_ERROR_PROTOCOL
           
static int JCO_ERROR_RESOURCE
           
static int JCO_ERROR_SERVER_STARTUP
           
static int JCO_ERROR_STATE_BUSY
           
static int JCO_ERROR_SYSTEM_FAILURE
           
static int JCO_ERROR_UNSUPPORTED_CODEPAGE
           
static int JCO_ERROR_XML_PARSER
           
 
Constructor Summary
JCO.Exception(int group, java.lang.String key, java.lang.String message)
          Creates an instance of the error object with the specified message
 
Method Summary
 int getGroup()
          Returns the error group The error group can be one of the following constants: Constant Description JCO_ERROR_ABAP_EXCEPTION An exception has been thrown by a function module in the remote system JCO_ERROR_APPLICATION_EXCEPTION An application exception has occurred in the remote SAP system JCO_ERROR_CANCELLED A registered JCo server has been cancelled JCO_ERROR_COMMUNICATION Exception caused by network problems, connection breakdowns, gateway problems, inavailability of the remote SAP system, etc.
 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
 

Field Detail

JCO_ERROR_PROGRAM

public static final int JCO_ERROR_PROGRAM

JCO_ERROR_COMMUNICATION

public static final int JCO_ERROR_COMMUNICATION

JCO_ERROR_LOGON_FAILURE

public static final int JCO_ERROR_LOGON_FAILURE

JCO_ERROR_SYSTEM_FAILURE

public static final int JCO_ERROR_SYSTEM_FAILURE

JCO_ERROR_APPLICATION_EXCEPTION

public static final int JCO_ERROR_APPLICATION_EXCEPTION

JCO_ERROR_RESOURCE

public static final int JCO_ERROR_RESOURCE

JCO_ERROR_PROTOCOL

public static final int JCO_ERROR_PROTOCOL

JCO_ERROR_INTERNAL

public static final int JCO_ERROR_INTERNAL

JCO_ERROR_CANCELLED

public static final int JCO_ERROR_CANCELLED

JCO_ERROR_STATE_BUSY

public static final int JCO_ERROR_STATE_BUSY

JCO_ERROR_NULL_HANDLE

public static final int JCO_ERROR_NULL_HANDLE

JCO_ERROR_CONVERSION

public static final int JCO_ERROR_CONVERSION

JCO_ERROR_FUNCTION_NOT_FOUND

public static final int JCO_ERROR_FUNCTION_NOT_FOUND

JCO_ERROR_ILLEGAL_TID

public static final int JCO_ERROR_ILLEGAL_TID

JCO_ERROR_UNSUPPORTED_CODEPAGE

public static final int JCO_ERROR_UNSUPPORTED_CODEPAGE

JCO_ERROR_ABAP_EXCEPTION

public static final int JCO_ERROR_ABAP_EXCEPTION

JCO_ERROR_FIELD_NOT_FOUND

public static final int JCO_ERROR_FIELD_NOT_FOUND

JCO_ERROR_NOT_SUPPORTED

public static final int JCO_ERROR_NOT_SUPPORTED

JCO_ERROR_SERVER_STARTUP

public static final int JCO_ERROR_SERVER_STARTUP

JCO_ERROR_XML_PARSER

public static final int JCO_ERROR_XML_PARSER

JCO_ERROR_ILLEGAL_ARGUMENT

public static final int JCO_ERROR_ILLEGAL_ARGUMENT
Constructor Detail

JCO.Exception

public JCO.Exception(int group,
                     java.lang.String key,
                     java.lang.String message)
Creates an instance of the error object with the specified message
Parameters:
group - the error group
key - error code to identify the error
message - the specified detail message.
Method Detail

getGroup

public final int getGroup()
Returns the error group

The error group can be one of the following constants:
Constant Description
JCO_ERROR_ABAP_EXCEPTION An exception has been thrown by a function module in the remote system
JCO_ERROR_APPLICATION_EXCEPTION An application exception has occurred in the remote SAP system
JCO_ERROR_CANCELLED A registered JCo server has been cancelled
JCO_ERROR_COMMUNICATION Exception caused by network problems, connection breakdowns, gateway problems, inavailability of the remote SAP system, etc.
JCO_ERROR_CONVERSION A conversion between two representations of either a parameter, structure, or table field has failed
JCO_ERROR_FIELD_NOT_FOUND A referenced field in either a JCO.ParameterList, JCO.Structure, or JCO.Table does not exist
JCO_ERROR_FUNCTION_NOT_FOUND A function interface or one of the data structures could not completely be retrieved from the repository
JCO_ERROR_ILLEGAL_TID An invalid transaction ID has been encountered. The TID was either longer than 24 characters or contained illegal characters
JCO_ERROR_INTERNAL An exception inside of JCo
JCO_ERROR_LOGON_FAILURE Authorization failures during the logon phase usually caused by unknown username, wrong password, invalid certificates, etc.
JCO_ERROR_NOT_SUPPORTED A feature is not being supported by the current version of JCo
JCO_ERROR_NULL_HANDLE An internally used connection handle is invalid
JCO_ERROR_PROGRAM A general program exception has occurred
JCO_ERROR_PROTOCOL An internal communication protocol error has been detected
JCO_ERROR_RESOURCE Indicates that JCO has run out of resources such as connections in a connection pool
JCO_ERROR_SERVER_STARTUP Something went wrong during the startup phase of a JCo server usually caused by passing a wrong gateway host or gateway service
JCO_ERROR_STATE_BUSY The remote SAP system is busy. Try again later
JCO_ERROR_SYSTEM_FAILURE A system failure in the remote SAP system has occurred
JCO_ERROR_UNSUPPORTED_CODEPAGE Either the remote SAP system or the local systems runs under a codepage which is not supported by JCo
JCO_ERROR_XML_PARSER A parse error due to an invalid XML document has occurred
JCO_ERROR_ILLEGAL_ARGUMENT An illegal method argument has been detected

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.Exception.