Design: 09.01.02.01/P03
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 3: Error 54 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.
Not open workstation with workstation identifier wkid to test if
functions 3,4,5,64,67,68,73,83,85,112 with workstation identifier wkid
generate error 54: ignoring function, the specified workstation is not open.
Then open workstation with wkid to test if function 4,6,67,87,111 with
workstation identifier wkid+1 generate error 54.
*** *** *** Generate errors; test absence of side effects *** *** ***
wkid = workstation identifier for primary workstation
<close workstation> with wkid: signals error
TEST: #SR 4
"If <close workstation> signals an error because the specified
workstation is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = closed)
<redraw all structures> with wkid, PALWAY: signals error
TEST: #SR 4
"If <redraw all structures> signals an error because the specified
workstation is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = closed)
<update workstation> with wkid, PPERFO: signals error
TEST: #SR 4
"If <update workstation> signals an error because the specified
workstation is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = closed)
<set text representation> with wkid,1,1,PSTRP,1.0,0.1,1: signals error
TEST: #SR 4
"If <set text representation> signals an error because the specified
workstation is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = closed)
colia(1,1) = pattern colour index array
colia = {1, 1}
<set pattern representation> with wkid,1,1,1,1,1,1,1,colia: signals error
cspec = colour specification
cspec = {1.,0.,0.,0.,0.,1.}
<set colour representation> with wkid, 1, 6, cspec: signals error
<set hlhsr mode> with wkid, 0: signals error
vwormt = view orientation matrix
set vwormt(4,4) to identity matrix
vwmpmt = view mapping matrix
set vwmpmp(4,4) to identity matrix
vwcplm = view clipping limit
set vwcplm(6) to {0.,1.,0.,1.,0.,1.}
xyclpi = x-y clipping indicator
set xyclpi to clipping
bclipi = back clipping indicator
set bclipi to clipping
fclipi = front clipping indicator
set fclipi to clipping
<set view representation 3> with wkid, 1, vwormt, vwmpmt, vwcplm, xyclpi,
bclipi, fclipi: signals error
<set view transformation input priority> with wkid, 1, 1, higher: signals error
<open structure> 101
<unpost structure> with wkid, 101: signals error
TEST: #SR 4
"If <unpost structure> signals an error because the specified
workstation is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = closed and
structure state = open)
<close structure>
<open workstation> with wkid, conid, wtype
<redraw all structures> with wkid+1: signals error
<inquire set of open workstations> to determine number (numowk)
and identity (opwkid) of open workstations
TEST: #SR 4
"If <redraw all structures> signals an error because the specified
workstation is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = open and
numowk = 1 and opwkid = wkid)
<set display update state> with wkid+1: signals error
<set pattern representation> with wkid+1,1,1,1,1,1,1,1,colia: signals error
<set workstation window> with wkid+1,0.,1.,0.,1.: signals error
<inquire set of open workstations> to determine number (numowk)
and identity (opwkid) of open workstations
TEST: #SR 4
"If <set workstation window> signals an error because the specified
workstation is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = open and
numowk = 1 and opwkid = wkid)
<open structure> 101
<post structure> with wkid+1: signals error
<inquire set of open workstations> to determine number (numowk)
and identity (opwkid) of open workstations
TEST: #SR 4
"If <post structure> signals an error because the specified workstation
is not open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = open and
numowk = 1 and opwkid = wkid)
<close structure>
<close workstation> wkid
*** *** *** Results of user-defined error handling *** *** ***
TEST: #SR 4
"If <close workstation> is called and the specified workstation is not
open, it should return error code 054 and/or 003, function
identifier 003, 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 4
"If <redraw all structures> is called and the specified workstation
is not open, it should return error code 054 and/or 003, function
identifier 004, 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 4
"If <update workstation> is called and the specified workstation is not
open, it should return error code 054 and/or 003, function identifier
005, 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 4
"If <set text representation> is called and the specified workstation is
not open, it should return error code 054 and/or 003, function
identifier 064, 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 4
"If <set pattern representation> is called and the specified
workstation is not open, it should return error code 054 and/or 003,
function identifier 067, 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 4
"If <set colour representation> is called and the specified workstation
is not open, it should return error code 054 and/or 003, function
identifier 068, 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 4
"If <set hlhsr mode> is called and the specified workstation is
not open, it should return error code 054 and/or 003, function
identifier 073, 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 4
"If <set view representation 3> is called and the specified workstation
is not open, it should return error code 054 and/or 003, function
identifier 083, 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 4
"If <set view transformation input priority> is called and the specified
workstation is not open, it should return error code 054 and/or 003,
function identifier 085, 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 4
"If <unpost structure> is called and the specified workstation is not
open, it should return error code 054 and/or 003, function identifier
112, 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 4
"If <redraw all structures> is called and the specified workstation
is not open, it should return error code 054 and/or 003, function
identifier 004, 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 4
"If <set display update state> is called and the specified workstation
is not open, it should return error code 054 and/or 003, function
identifier 006, 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 4
"If <set pattern representation> is called and the specified workstation
is not open, it should return error code 054 and/or 003, function
identifier 067, 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 4
"If <set workstation window> is called and the specified workstation
is not open, it should return error code 054 and/or 003, function
identifier 087, 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 4
"If <post structure> is called and the specified workstation is not
open, it should return error code 054 and/or 003, 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 3