intro_error
Error reporting and logging can be handling through several routines.
'error_init(_c)' initializes the reporting and logging. It establishes
where on the screen (TV or graphics) errors are displayed.
For the TV, one can establish scrolling regions and other various
display attributes. 'error_init(_c)' also sets up use of Filesharing
file for holding a circular log of the entries.
'error_display(_c)' is a function for checking for an error (one can
specify ACNET, C RTL, system, or integer) and expanding it along with
user supplied text. One can also just write informational messages.
If logging is setup with 'error_init(_c)', a log entry will be written.
'log_read' is a routine for displaying a log file. When called,
'log_read' will provide an environment for the user to view and
search the log.
'log_write' allows writing a log entry. This is also possible with
'error_display(_c)'.
To create a shared log file, use console page D112 (Log Test).
Click on the button labelled 'Create a New Log File'. You will
then be prompted to enter an 8 character log file name and a
log file size. This name can then be used in the function call
'error_init(_c)'.
See console page D112 (Log Test) for the use of these routines.
CLU routines support circular log files and the log format files,
including operations to create, open and close log files; to add and get
lines from the log files; to find the log files last updated record;
to change the phyical location within the log file, to write the
current add poisition pointer to the format file, to edit the format
file, and to get info on the format file.
Several of the routines accept 16-bit ACNET standard error codes and
return or display on the screen a short error message (ie 'errhlp(_c)').
'math_exception_check', used by CLIB routines, checks for arithmetic
exceptions.
CNSLOG is a program that will read the standard console program logs
into a local file, in ASCII text. A directory of log file names is
available when you run CNSLOG.
To run CNSLOG enter:
/usr/local/mecca_head/mecca/services/cnslog/cnslog [{logname}]
Where you can optionaly specify the "logname"; otherwise you are
prompted for it while running the program.
See also 'intro_application_errors'.
Related functions:
clu_add, clu_close, clu_get, clu_open, clu_update,
errhlp(_c), error_clip_depth_c, error_close, error_cmprintf_c,
error_colored_message_c, error_disp_uti, error_display(_c),
error_erase, error_imbedded_enabled, error_imbedded_off,
error_imbedded_on, error_in_list(_c), error_init(_c), error_init_uti,
error_last, error_message(_c), error_move_disable, error_move_enable,
error_mprintf_c, error_pop_window, error_printf_c,
error_query_clipping, error_query_setup, error_size_and_position_c,
error_trace_get, error_trace_off, error_trace_on, error_trace_view_c,
error_unpack(_c), error_uti_logging_c, log_read, log_read_setup_c,
log_write, math_exception_check, math_exception_establish