APPENDIX C
ERROR HANDLING
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.
C-1
Summary of Contents for 7064
Page 2: ...Racal Instruments...
Page 6: ...I 1 1 1 1 1...
Page 21: ...I 1 I I I I I I I I I 1 1 I I I I I I...
Page 29: ...I I I I I I I I I I I I I I I I I I I...
Page 57: ...1 I I I I I I I I I I I I I I I I I I...
Page 77: ...1...
Page 111: ...0 00 0 00 tI I 4 0 0 I7 r i 6 4 7 4 7 0 T 6 0 0 7 28...
Page 112: ......
Page 113: ...7 30 I I I 1 I I I I I I I I I I I I I I I...
Page 115: ...7 32...
Page 148: ......
Page 164: ...I I I I I I I I I I 1 I I I I I I I I...
Page 176: ...extern char error_msg_lookup unsigned errdes endif ERROR_INCLUDE C 8...