Show TOC Entering content frame

Function documentation Error Handling Locate the document in its SAP Library structure

ABAP

Java

Use

The following errors can be handled by the Exchange Infrastructure:

·        System errors, which are triggered by the Exchange Infrastructure. These might be errors during transfer, due to a failed server, for example.

·        Application errors, which are triggered or handled by the application alone. An example would be a request for data about a material that is unknown in the receiver system.

Error handling is essentially of interest in the synchronous case. In this case, an application can report application errors to the caller application. In the asynchronous case, you can catch an error that has occurred during transfer and, on the inbound side, forward an error to monitoring.

Features

Handling System Errors

You can catch errors that occur when a message in being transferred, using the exception class SystemFaultException, so that the system displays an error message.

Note

The full name of the exception class for system errors is: com.sap.aii.proxy.xiruntime.core.SystemFaultException.

Handling Application Errors

In the Integration Repository, you can define fault messages to handle application errors. The proxy generation functions then generate exception classes. You can use fault messages to handle errors triggered by the called application or persist them for monitoring purposes:

Message Interface

Error Handling Options

Synchronous Communication (Inbound/Outbound)

An exception is triggered at the receiver that is providing a service; the exception is handled by the sender that called the service.

Asynchronous Inbound Interface

Fault messages are not used here to handle an exception at the sender. The fault message generated by the triggered error is persisted for monitoring instead.

Exception classes for application errors are derived from the basis exception class ApplicationFaultException. You can use this exception class to determine an error situation, independently of the exact error, or in an else branch, you can use it to catch all the errors that have not yet been handled.

Note

The full name of the exception class for application errors is: com.sap.aii.proxy.xiruntime.core.ApplicationFaultException.

Activities

...

       1.      To handle an application error, create fault messages for your message in the Integration Repository.

       2.      In each case, handle system errors, and, if necessary, application errors (see:  Reporting and Handling Errors).

 

 

 

 

Leaving content frame