com.highdeal.iec
Class CannotInitializeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.highdeal.iec.CannotInitializeException
All Implemented Interfaces:
java.io.Serializable

public class CannotInitializeException
extends java.lang.Exception

Exception thrown during the initialization of a customized Java task to be executed by an Import/Export Connector (IEC) application in your system landscape.

It includes an exception message and an exception reason. There are three possible reasons for this exception:

Use the getReason() method and the Throwable.getMessage() method for more details about your thrown exception.

Implementation in Your IEC Application

Refer to the implementation information in the Java task topic.

See Also:
JavaTask.setProperties(java.util.Properties), Serialized Form

Field Summary
static int ALREADY_EXIST
          1: Reason code set by the IEC application when an entity already exists; See the getReason() method of the exception for more details.
static int DOES_NOT_EXIST
          0: Reason code set by the IEC application when an entity does not exist; See the getReason() method of the exception to get the code and the Throwable.getMessage() method for more details about your thrown exception.
static int INVALID
          2: Reason code set by the IEC application when the initialization of a Java Task is not valid; See the getReason() method of the exception for more details.
 
Constructor Summary
CannotInitializeException(int reason, java.lang.String message)
          Constructs a new instance of CannotInitializeException with a reason code and a text message.
 
Method Summary
 int getReason()
          Returns the reason code of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DOES_NOT_EXIST

public static final int DOES_NOT_EXIST
0: Reason code set by the IEC application when an entity does not exist; See the getReason() method of the exception to get the code and the Throwable.getMessage() method for more details about your thrown exception.

See Also:
Constant Field Values

ALREADY_EXIST

public static final int ALREADY_EXIST
1: Reason code set by the IEC application when an entity already exists; See the getReason() method of the exception for more details.

See Also:
Constant Field Values

INVALID

public static final int INVALID
2: Reason code set by the IEC application when the initialization of a Java Task is not valid; See the getReason() method of the exception for more details.

See Also:
Constant Field Values
Constructor Detail

CannotInitializeException

public CannotInitializeException(int reason,
                                 java.lang.String message)
Constructs a new instance of CannotInitializeException with a reason code and a text message.

Parameters:
reason - The reason code of this exception
message - The exception message that specifies more information details; It is accessible by the Throwable.getMessage() method.
Method Detail

getReason

public int getReason()
Returns the reason code of this exception.

There are three possible reasons:

Note

See the Throwable.getMessage() of your thrown exception for more details.

Returns:
The reason code
See Also:
DOES_NOT_EXIST, ALREADY_EXIST, INVALID

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)