Fix Errors in the Generated Code
The error handler lets you view and correct errors in a frame's 4GL code. Errors generally are located in one of these areas:
• The Visual Query Editor window
• The parameter or local variable definition window
• Escape code you have entered for a frame
When you use the FixError operation as described below, Vision displays as precisely as possible the location where the error occurred. For example, if you have specified an incorrect query restriction on an Update frame, Vision displays the section of the visual query window containing the incorrect specification.
You must return to the original location to correct certain errors; you cannot go through the error handler. For example, if you have specified a frame definition without a join column between the Master and Detail table, you must return to the Visual Query Editor to add a join column.
You can identify such errors because their error listing file is specified as "Unavailable." Vision generates an error message if you try to fix the error through the error handler.
Remember that a single syntax error in 4GL code—omitting a statement terminator in escape code, for example—can generate a series of subsequent syntax errors in the code. You can identify when this happens because the errors appear in successive lines of code. Usually, fixing the first error also corrects the errors that follow.
To fix an error through the error handler
1. PositionFix Errors in the Generated Code the cursor on the error at the top of the error window.
2. Select FixError from the menu.
Vision displays a pop-up containing the incorrect specification or code.
3. Correct the error.
4. Select End to save your changes and return to the error window.
The error now contains a value of "yes" in the Fixed field. Vision also marks the error as "FIXED" in the error listing file for the frame.
These indicators do not necessarily mean that you have fixed the error correctly. Vision cannot determine that the error is corrected until you recompile the frame.
If you know that you have not corrected the error, you can change the designation in the Fixed field to "no" as described below.
Last modified date: 01/30/2023