Design: 09.01.02.01/P10
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 10: Error 63 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.
*** *** *** Generate errors; test absence of side effects *** *** ***
call MULTWS to get number of all accessible workstations: nwkall
Use <inquire phigs facilities> to determine:
maxwk = maximum number of simultanenously open workstations
If (nwkall <= maxwk) then
call INMSG ('The number of all accessible workstations
is less than or equal to maximum number of
simultaneously open workstations, this test is skipped.)
return
endif
for ix = 1 to maxwk+1
call MULTWS to get
workstation identifier: owkid
connection identifier: oconid
workstation type: owtype
if (ix <= maxwk) then
<open workstation> with owkid, oconid, owtype
else
<open workstation> with owkid, oconid, owtype: signals error
endif
next ix
<inquire set of open workstations> to get # open workstations
TEST: #SR 12
"If <open workstation> signals an error because it would
exceed the maximum number of simultaneously
open workstations, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = open and
# open workstations = maxwk)
*** *** *** Results of user-defined error handling *** *** ***
TEST: #SR 12
"If <open workstation> is called and it would exceed the maximum
number of simultaneously open workstations, it should return
error code 063, function identifier 002, 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 10