Viewing programs that contain coding errors

From m204wiki
Jump to navigation Jump to search

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.