Design: 09.01.05.01/P06
This is an abstract, language-independent design. Grim
details may be found in the
corresponding source code.
You may return to the
documentation
for the module containing this program design, or to the
entire hierarchical table of
topics covered by the PVT.
PROGRAM 6: Error 208 handled by user
CHARACTERISTICS: ynnn
OPERATOR SCRIPT:
See OPERATOR SCRIPT for Program 1.
DESIGN:
Throughout this program, every time an error is signalled (as noted
by the tag "signals error"), the user-defined error handler saves
the error code, function identifier, and error file identifier in
an error table.
Post structure with a display priority less than 0 or larger than 1
to test if the function 111 generates error 208: ignoring function,
the display priority is out of range.
*** *** *** Generate errors; test absence of side effects *** *** ***
<open workstation> wkid
create structure network 100 - 101
<post structure> with wkid, structure id=100, display priority=0.5
<post structure> with wkid, 101, display priority=-0.1 : signals error
<post structure> with wkid, 101, display priority= 1.1 : signals error
use <inquire posted structure> to get:
number = number of posted structures
postst = list of posted structures
orgpri = priority
TEST: #SR 6
"If <post structure> signals an error because the specified
display priority is out of range, it should not cause any other
effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = open and
number = 1 and postst = (100) and
orgpri = 0.5)
*** *** *** Results of user-defined error handling *** *** ***
TEST: #SR 6
"If <post structure> is called and the specified display
priority is out of range, it should return error
code 208, function identifier 111, and the current error file
identifier to the user defined error handler."
pass/fail depending on (next entry in error table = expected values)
TEST: #SR 6
"If <post structure> is called and the specified display
priority is out of range, it should return error
code 208, function identifier 111, and the current error file
identifier to the user defined error handler."
pass/fail depending on (next entry in error table = expected values)
END PROGRAM 6