next up previous
Next: Enquiring about Past History Information
Up: THE HISTORY COMPONENT
Previous: Formatting Options for History Text

Automatic Error Recording   

One event which it is usually very important to know about is the failure of an application to complete properly. This could be because something unrecoverable went wrong and the application decided to terminate prematurely, or it could simply be that the user requested that it should abort. In either case, it is important that any datasets modified by that application should contain some record that it did not complete normally, so that they can later be identified and their contents regarded with appropriate suspicion.

The NDF_ library provides this service automatically via its history recording mechanism. To do this, it inspects the value of the STATUS argument passed to any routine which can potentially cause NDF datasets to be released from the NDF_ system (NDF_ANNUL and NDF_END). If the STATUS value is not equal to SAI__OK,[*] this is taken to indicate that an error has occurred and that any NDFs released at that point may contain erroneous data. To record this fact, the value of STATUS and the text of any pending error messages (as previously reported through the ERR_ and EMS_ routines - see SUN/104 and SSN/4) will be appended to the current history record before each NDF is released. Rather similar action is also taken by the special routine NDF_HEND (although it does not itself cause NDF datasets to be released - see §[*]).

This error recording facility operates somewhat like NDF_HPUT with an effective priority of `QUIET', so recording of errors will take place regardless of the current history update mode setting. However, it will not occur if history recording is completely disabled.



next up previous
Next: Enquiring about Past History Information
Up: THE HISTORY COMPONENT
Previous: Formatting Options for History Text


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils