Show TOC

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 is 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.framework.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. Using fault messages, you can handle errors triggered by the called application or persist them for monitoring purposes:

Message Interface

Options for Error Handling

Synchronous Communication (Inbound/Outbound)

Triggering of an error at the receiver that is providing a service; handling of the error at the sender that called the service.

Asynchronous Inbound Interface

Fault messages are not used here to handle a error 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.framework.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