Definition of Exceptions 

Use

You define exceptions for a method when you want to "publicize" error situations in a standardized manner in order to give the caller of the method the opportunity to react to the error situations.

Prerequisites

You can only define exceptions for synchronous methods.

Activities

To define exceptions for a method, position the cursor on the method and select Exceptions. The existing exceptions for the method are displayed and you select to create a new exception.

Give the exception an identifying number in the dialog box Add Exceptions, which is used to address it in the implementation program. The following number ranges apply:

Exceptions are classified according to error types.

Specify the class and number of the message to be displayed if the exception occurs.

You must specify when the exceptions are triggered in the implementation program.

 

You cannot change or delete exceptions inherited with their method from a supertype or an interface.

For further information, refer to Programming Exceptions.