Show TOC

 Exceptions

Error situations occurring during the execution of a program.

Use

Raising Exceptions from Within an Action

OITF provides the exception class CX_COM_IOITF_ACTION that can be used to raise an exception from within an action. This exception class provides attributes in addition to those that come from the root exception class CX_ROOT .

Below is a list of attributes that you can fill from within your action when you want to raise an exception.

Attributes for Raising Exceptions from Within an Action

Attribute

Description

EXCEPTION

This attribute is of type SEOSCONAME . If you choose to give your exception a name (recommended), this attribute is used to hold that name. It is good practice to name your exceptions so that you can keep track of them.

EX_METHOD

This attribute is of type SEOCPDNAME . It is used to hold name of the method in your action class where the exception occurs. It is good practice to fill it so that you know exactly where the exception occurred without having to debug.

EX_CLASS

This attribute is of type SEOCLSNAME . It is used to hold name of the action class in whose method the exception occurs. It is good practice to fill it so that you know exactly where the exception occurred without having to debug.

BAPI_CORU_RETURN

This attribute is of type COMT_IOITF_BAPI_CORU_RETURN_T . It can be used to hold messages.

OBJECT_FAMILY

This attribute is of type COMT_PRODUCT_OBJECT_FAMILY . It is used to hold the object family. It is good practice to fill it. You can get the object family from the application context within your action.

Note Note

If you need to create your own action exception classes, they should extend (inherit) OITF’s action exception class CX_COM_IOITF_ACTION .

End of the note.
Raising Exceptions from Within a Guard Condition

OITF provides the exception class CX_COM_IOITF_GC_EVALUATION that can be used to raise an exception from within a guard condition. This exception class provides attributes in addition to those that come from the root exception class CX_ROOT .

Below is a list of the attributes that you can fill from within your guard condition when you want to raise an exception.

Attributes for Raising Exceptions from Within a Guard Condition

Attribute

Description

EXCEPTION

This attribute is of type SEOSCONAME . If you choose to give your exception a name (recommended), this attribute is used to hold that name. It is good practice to name your exceptions so that you can keep track of them.

EX_METHOD

This attribute is of type SEOCPDNAME . It is used to hold name of the method in your guard condition class where the exception occurs. It is good practice to fill it so that youknow exactly where the exception occurred without having to debug.

EX_CLASS

This attribute is of type SEOCLSNAME . It is used to hold name of the guard condition class in whose method the exception occurs. It is good practice to fill it so that you know exactly where the exception occurred without having to debug.

BAPI_CORU_RETURN

This attribute is of type COMT_IOITF_BAPI_CORU_RETURN_T . It can be used to hold messages.

OBJECT_FAMILY

This attribute is of type COMT_PRODUCT_OBJECT_FAMILY . It is used to hold the object family. It is good practice to fill it. You can get object family from the application context within your guard condition.

EVENT_NAME

This attribute is of type COMT_EVENT_NAME . It is used to hold the event name. It is good practice to fill it. You can get the event name from the application context within your guard condition.

Note Note

If you need to create your own guard condition exception classes (for whatever reason), they should extend (inherit) OITF’s guard condition exception class CX_COM_IOITF_GC_EVALUATION.

End of the note.
High Tech Software Entitlement Demo

A sample application is delivered with OITF. The whole demo application is contained in package COM_IOITF_DEMO_MODEL_HIGH_TECH .