Errors

If SPECTRA detects an error condition, it displays a message which gives some information about what might have gone wrong. The user has to acknowledge error messages by pressing the <ret> key, unless the command
SPECTRA> set error off
has been entered. In this case the error message is displayed and SPECTRA continues after a few seconds. The command set error on restores the default mode.

The last error message can be checked by:

SPECTRA> show error

If an error message is acknowledged by pressing the 'D' key, SPECTRA dumps the result of the command analysis to the terminal: The verb, qualifier and parameter. This may help you to locate the problem.

Command files can be debugged by:

SPECTRA> set verify
If this is set, SPECTRA displays every command it executes. There is one optional parameter, a wait time [seconds]. The verify mode is disabled by set nover.

The completion status of the previous command can be checked with the function gra_status(), e.g.:

...
inquire fname " Enter file name "
...
read/asc fname
if !gra_status()
  say ""
  say " Failed to read "fname" exiting "
  wait 3
  end
endif
...

There is a flag that determines how SPECTRA reacts, if an error occurs during the execution of a command file:

SPECTRA> set run_error abort
SPECTRA> set run_error noabort default
If it is set to abort, SPECTRA stops executing files and returns to the command line.

If the user detects a fatal condition in a file, he can tell SPECTRA to stop executing commands from a file:

SPECTRA> set abort on
Again control returns to the command line. This flag is automatically cleared.



Subsections