Release 10.1A: OpenEdge Getting Started:
WebSpeed Essentials

> ## WebSpeed Error Customization Utility

> The WebSpeed Error Customization Utility allows you to change the content of any OpenEdge error message that is passed by the WebSpeed Messenger to client browsers. For example, you can shield the users of your application from seeing error numbers and direct them to contact a system administrator instead.

> In general, the WebSpeed Messenger passes default error messages to client browsers when WebSpeed requests generate errors. Using the WebSpeed Error Customization Utility, you can:

> - Retain the default error message.

> - Replace the default error message with a message that you create.

> - Pass a URL to the client browser, which directs the client browser to a specified Web site.

> To access the WebSpeed Error Customization Utility, you must enable the Administration Utility. You can do this through the Progress Explorer by choosing Internal Administration Command in the Messenger Properties Advanced Features dialog box. Or, you can add the following line to the [`WebSpeed.Messengers.``messenger type`] section of the `ubroker.properties` file:

>     AllowMsngrCmds=1

> After you have enabled the Administration Utility, use a Web browser to go to the WebSpeed Messenger Administration Page on any machine that has access to the utility. Use a URL with the following format:

> :

>     http://host_name[:port]/scripts_dir/messenger/WService=broker?WSMAdmin

> When you have accessed the WebSpeed Messenger Administration Page, select Customize Messenger Error Messages, which displays the WebSpeed Error Customization Utility shown in Figure 3–3.

> Figure 3–3: WebSpeed Error Message Customization Utility

> Within the Customization Utility, you can either accept defaults, create your own error messages, or redirect client browsers to a specified URL. Any changes you make are written to the Messenger’s `wsCusErr.txt` file, which is created in the Messenger’s log file directory. You do not need to restart the Messenger to make your changes effective.

> Note: There is a limitation on how many error messages you can customize. Currently, the `wsCusErr.txt` file can contain customizations for no more than 32 error messages.

> Another way to customize error messages is to directly edit the`wsCusErr.txt` file, which, if it does not already exist, you can create in the Messenger’s log file directory. Use any editor that allows you to save as an unformatted text file.

> Entries in the `wsCusErr.txt` file have the following syntax:

>     error_number 0|1|2
>     message|URL

> ``error_number``

> A number that represents a OpenEdge error. If `error_number` is `0`, it will match all OpenEdge error numbers, except those that are specified in the file. You can use an entry with an `error_number` of `0` to create a general message for any errors that you did not explicitly customize.

> `0|1|2`

> `0` causes the default OpenEdge error message to be displayed. `1` causes the text string specified in the next line to be displayed. `2` causes the URL specified in the next line to be passed to the client browser.

> ``message`|`URL``

> `message` is a text string representing the customized error message that you want to send to the browser. `URL` is a text string representing the URL for a valid Web site.

> An example of the contents of a `wsCusErr.txt` file follows:

>     8239 1
>     Name Server is not responding. Please contact administrator.

>     0 2
>     http://www.progress.com

> The first entry causes the specified messages to be displayed whenever an `8239` error is generated. The second entry directs the client browser to the specified Web site whenever any other error is generated.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095