Handling Application Errors

Any exception that occurs when your application is running will display an error form. If the exception occurs in an event, the error form specified by that event will be displayed; elsewhere, the default error form for the application will be displayed (these may, of course, be the same form). The default error form include an Error Report control, which will display any error messages that cause this form to be displayed.

If you aren't using the default error form, or if you want a special error form for a specific event, use the procedures below.

To create a new error form
  1. Open your project in Presentation Designer and click the Customize tab.

  2. Click the New Form button.

    The New Form dialog box appears.

  3. Type a name for your new form, then click OK.

  4. From the Controls Toolbar on the left side of the Editor, click the icon for the Error Report control.

    It's at the bottom of the toolbar.

  5. Move the cursor to the form (the cursor changes to a cross-hair), then click the mouse on the form where you want to place the control.

  6. Reposition or resize the control as necessary to suit your particular needs.

To associate an event with your new error form
  1. Open your event in the Event editor.

    With the event selected under Event Steps, the Associated Error Form list box appears under Event Properties.

  2. From the Associated Error Form list box, select the form you want to display.

    Only user-defined forms will be available to choose from.

Related Topics
Bullet Restructuring Application Flow, Overview
Bullet Adding Events to Controls
Bullet Configuring Run-time Event Logging
  Attachmate