Viewing programs that contain coding errors: Difference between revisions

From m204wiki
Jump to navigation Jump to search
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>


<div style="text-align: left; text-indent: 0; page-break-after: avoid; padding: 0 0 0 0; margin: 23px 0 7px 0;">
=== Compilation Errors ===
 
{|
| [[File:hmtoggle_plus1.gif|9x9px|class=dropdown-toggle-icon|hmtoggle_plus1]]
| <span class="f_Subhead">[javascript:HMToggle('toggle','TOGGLE0186A1','TOGGLE0186A1_ICON') Compilation errors ] <span id="compile_errors" class="hmanchor"></span></span>
|}
 
 
</div>
<div id="TOGGLE0186A1" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 30px;">


{|
{|
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&gt;</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&gt;</span><span class="f_Para">) after the program statements that caused them: </span>


[[compileerr3a1.zoom65.gif|[[File:compileerr3a1.zoom65_zoom75.gif|class=image-toggle|compileerr3a1.zoom65_zoom75]][[File:data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaW1hZ2UtdG9nZ2xlLW1hZ25pZmllciIgdmlld2JveD0iLTEgLTEgMjUgMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTSA5LjE0NSAxOC4yOSBjIC01LjA0MiAwIC05LjE0NSAtNC4xMDIgLTkuMTQ1IC05LjE0NSBzIDQuMTAzIC05LjE0NSA5LjE0NSAtOS4xNDUgcyA5LjE0NSA0LjEwMyA5LjE0NSA5LjE0NSBzIC00LjEwMiA5LjE0NSAtOS4xNDUgOS4xNDUgWiBtIDAgLTE1LjE2NyBjIC0zLjMyMSAwIC02LjAyMiAyLjcwMiAtNi4wMjIgNi4wMjIgcyAyLjcwMiA2LjAyMiA2LjAyMiA2LjAyMiBzIDYuMDIzIC0yLjcwMiA2LjAyMyAtNi4wMjIgcyAtMi43MDIgLTYuMDIyIC02LjAyMyAtNi4wMjIgWiBtIDkuMjYzIDEyLjQ0MyBjIC0wLjgxNyAxLjE3NiAtMS44NTIgMi4xODggLTMuMDQ2IDIuOTgxIGwgNS40NTIgNS40NTMgbCAzLjAxNCAtMy4wMTMgbCAtNS40MiAtNS40MjEgWiI+PC9wYXRoPjwvc3ZnPg==|class=image-toggle-magnifier]]]]<span class="f_Para"> </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"> &gt; </span><span class="f_GUIlabel">Next Compile Error</span><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 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"> &gt; </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"> &gt; </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"> &gt; </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>
<div style="text-align: left; text-indent: 0; page-break-after: avoid; padding: 0 0 0 0; margin: 23px 0 7px 0;">
{|
| [[File:hmtoggle_plus1.gif|9x9px|class=dropdown-toggle-icon|hmtoggle_plus1]]
| <span class="f_Subhead">[javascript:HMToggle('toggle','TOGGLE0186A3','TOGGLE0186A3_ICON') Request cancellation errors ]<span id="request_cancel_err" class="hmanchor"></span></span>
|}


</div>
=== Request cancellation errors ===
<div id="TOGGLE0186A3" class="dropdown-toggle-body" style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 30px;">


{|
{|
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>
|-
 
| <span class="f_Para"> </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.

  • You can move to the next program statement that did not compile, if any, by pressing the F11 key (by default), by selecting the Error > Next Compile Error menu item, or by using a button to which you have mapped the nextCompileError command.
  • You can move to the previous statement that did not compile, if any, by pressing the F10 key, by selecting the Error > Previous Compile Error menu item, or by using a button to which you have mapped the previousCompileError command.

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:

runtimeError78

It also:

  • Reports the values of any watched variables at the point of the error
  • Reports the canceling error message in the Client's audit trail displays
  • In Model 204 Version 7.8 or higher, the routine or method where the error occurred is identified.