Show TOC

Error HandlingLocate this document in the navigation structure

Use

A standard error handling mechanism is implemented in the ICM and SAP Web Dispatcher. You can however configure both components so that a different error handling mechanism suitable for your application area is used.

Caution

Error situations that occur in the back end are not handled by the ICM/Web Dispatcher. If, for instance, an HTTP error 404 (file not found) occurs in the file access handler of the ICM/Web Dispatcher, an error page is returned if one is configured. But if the request goes to the Application Server ABAP (because of the URL) and the requested file is not found in the Internet Communication Framework (ICF), the ICM forwards the error page generated by the ICF to the browser.

Standard Error Handling

Profile parameter is/HTTP/show_detailed_errors configures whether error details are returned to the browser if there is an error, or not. The default value of the profile parameter is FALSE. The details are suppressed.

If you were to set the value of the parameter to TRUE, the error page would contain the following detailed information about the cause of the error: Name of the application server, date, module, line, component, description of error.

Controlling Error Handling

You can also configure the ICM and the SAP Web dispatcher so that they returns dynamic error pages.

The following section describes how you do this.

  • Under error codes you can find the name of the errors that ICM and Web dispatcher know of.

  • You can create a default page or a separate page for each error (static or dynamic).

  • You can find an example of a dynamic error page in "Example of a Dynamic Error Page".

ICM / Web Dispatcher Prioritizing

If parameter icm/HTTP/error_templ_path is not set, the ICM static error page is always returned.

If the parameter is set, and if error <ERRNAME> occurs, the ICM or Web Dispatcher first checks whether file ICMERR <ERRNAME>.html is located in the directory specified by the profile parameter icm/HTTP/error_templ_path, and sends it to the client. If it cannot find this file, it searches for ICMERR <ERRNAME>.shtml and returns it.

In no specific error page can be found, the ICM returns the default error page ICMERR-EDEFAULT.{html,shtml} (as above). If this file also does not exist, the static page is returned.

Updating Error Pages

For reasons of performance, the ICM or Web dispatcher checks once the error templates that are available. This is why you must restart the ICM if you add new templates (changes to the templates are recognized). To restart the ICM, you can use the Web administration interface.