Viewing programs that contain coding errors: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
<span class="f_Para">Debugger handling of errors differs according to the type of error: compilation errors or request cancelling (runtime) errors.</span> | <span class="f_Para">Debugger handling of errors differs according to the type of error: compilation errors or request cancelling (runtime) errors.</span> | ||
=== Compilation Errors === | |||
{| | {| | ||
Line 17: | Line 8: | ||
<span class="f_Para">If a program contains a compilation error, you can still use the Debugger to view the source code, along with the </span><var>Model 204</var><span class="f_Para"> error messages embedded (highlighted and prefixed with </span><span class="f_Monospace">ER></span><span class="f_Para">) after the program statements that caused them: </span> | <span class="f_Para">If a program contains a compilation error, you can still use the Debugger to view the source code, along with the </span><var>Model 204</var><span class="f_Para"> error messages embedded (highlighted and prefixed with </span><span class="f_Monospace">ER></span><span class="f_Para">) after the program statements that caused them: </span> | ||
[[File:compileerr3a1.zoom65_zoom75.gif]] | |||
<span class="f_Para">As shown above, the status strip displays a </span><span class="f_Monospace">Compile errors!</span><span class="f_Para"> message, and the </span><var>Run</var><span class="f_Para"> button is the only program execution operation available. </span> | <span class="f_Para">As shown above, the status strip displays a </span><span class="f_Monospace">Compile errors!</span><span class="f_Para"> message, and the </span><var>Run</var><span class="f_Para"> button is the only program execution operation available. </span> | ||
* <span class="f_ListBul1">You can move to the next program statement that did not compile, if any, by pressing the F11 key (by [[Default settings of buttons and hot keys|default]]), by selecting the </span><var>Error</var><span class="f_ListBul1"> > </span>< | * <span class="f_ListBul1">You can move to the next program statement that did not compile, if any, by pressing the F11 key (by [[Default settings of buttons and hot keys|default]]), by selecting the </span><var>Error</var><span class="f_ListBul1"> > </span><var>Next Compile Error</var><span class="f_ListBul1"> menu item, or by using a button to which you have [[Setting up the ui.xml file#Button toggle for compilation errors|mapped]] the </span><span class="f_Monospace">[[nextCompileError command|nextCompileError]]</span><span class="f_ListBul1"> command. </span> | ||
* <span class="f_ListBul1">You can move to the previous statement that did not compile, if any, by pressing the F10 key, by selecting the </span><var>Error</var><span class="f_ListBul1"> > </span><span class="term">Previous Compile Error</span><span class="f_ListBul1"> menu item, or by using a button to which you have mapped the </span><span class="f_Monospace">[[previousCompileError command|previousCompileError]]</span><span class="f_ListBul1"> command. </span> | * <span class="f_ListBul1">You can move to the previous statement that did not compile, if any, by pressing the F10 key, by selecting the </span><var>Error</var><span class="f_ListBul1"> > </span><span class="term">Previous Compile Error</span><span class="f_ListBul1"> menu item, or by using a button to which you have mapped the </span><span class="f_Monospace">[[previousCompileError command|previousCompileError]]</span><span class="f_ListBul1"> command. </span> | ||
Line 29: | Line 20: | ||
</div> | </div> | ||
=== Request cancellation errors === | |||
{| | {| | ||
Line 51: | Line 34: | ||
* <span class="f_ListBul1">Reports t</span><span class="f_Para">he canceling error message in the Client's audit trail displays</span> | * <span class="f_ListBul1">Reports t</span><span class="f_Para">he canceling error message in the Client's audit trail displays</span> | ||
* <span class="f_Para">In Model 204 Version 7.8 or higher, the routine or method where the error occurred is identified.</span> | * <span class="f_Para">In Model 204 Version 7.8 or higher, the routine or method where the error occurred is identified.</span> | ||
|} | |} | ||
Latest revision as of 16:53, 1 May 2023
Debugger handling of errors differs according to the type of error: compilation errors or request cancelling (runtime) errors.
Compilation Errors
If a program contains a compilation error, you can still use the Debugger to view the source code, along with the Model 204 error messages embedded (highlighted and prefixed with ER>) after the program statements that caused them: As shown above, the status strip displays a Compile errors! message, and the Run button is the only program execution operation available.
Clicking Run (or selecting Error > Quit) invokes no further operation on the code, and (if Janus Debugger) the Web Server sends the compilation error messages to the browser, then advances to the next program, if any. If under the TN3270 Debugger, the compilation error messages are sent to the terminal. |
Request cancellation errors
If a program contains a request cancelling (runtime) error, the Debugger lets you step through the program until you execute the statement that causes the error, or if you click Run, executes until the point of the error. At this point, the Client displays the source code (highlighting the line that has the error), for example: It also:
|