Racal Instruments 7064 Instruction Manual page 169

Table of Contents

Advertisement

Errors can be classified according to type and severity; they are denoted by unsigned integer
values referred to as 'error descriptors'. S e e the error.h file for a complete description.
The VT1 associates a message string with each error descriptor. This message string is a 'printf-
style' format string, i.e. i t can contain embedded "%" format specifications. A t run-time,
additional arguments passed to the error handler are used as 'printf' parameters, thus providing
supplemental information in the error message. I n the simplest case the message is a simple
string that doesn't contain any embedded "%" format specifiers, and thus no additional arguments
are required.
execerror() is the executive error management function. It's called to process all classes of VT1
errors. I t simply transmits its arguments to, and invokes, an error handler. I t is the error
handler's responsibility to carry out the actual error processing. B y default, the normal VT1 error
handler is invoked. T h e user may select an application-specific error handler with the
set_error_handler() function, however. I n this case the application-specific error handler is
invoked with the same arguments as the default VT1 error handler, and is free to process the
errors in any way it sees fit.
Default VT1 error handling:
The default VT1 error handler performs the following operations:
a. Prefixes a short string onto the message denoting the error type. For example, "Warning:
", and "Syntax error: ".
b. Expands additional 'printf-style' error message arguments, i f any.
c. Prints the fully-constructed error message to the output buffer.
d. I f the E_LINEDUMP bit is set in the error descriptor, then the current input line is printed
too. This can assist the user in locating the actual source of the error.
e. C a l l s signal_errO to alert VXI controller of an error condition.
f. I f the error is fatal, i t "locks up" in an infinite loop. A l l interrupts remain enabled,
however.
APPENDIX C
ERROR HANDLING
C-1

Advertisement

Table of Contents
loading

Related Products for Racal Instruments 7064

Table of Contents