Using a Label to Handle Custom Errors

The following image includes an example that uses a label to handle a custom error.

Example That Handles Custom Errors With a Label. This image is described in surrounding text.

Explanation of Callouts

The example that uses a label to handle a custom error includes the following items:

  1. Place the code that handles the error immediately before the line of code that could cause an error.

  2. Use a labeled section of code to handle the custom error.