Design: 09.01/P02

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 2: User error handling capabilities

CHARACTERISTICS: nnnn

OPERATOR SCRIPT: passive test.

DESIGN:

In user defined PERHND, there are variables ERRCOM, FUNCOM, FILCOM
in the common block ERRINF, which are used for recording the error number
function identifier and error file passed by PHIGS when an error occur.
Pass/fail depends on whether correct error number, function identifier
and error file are passed to ERRCOM, FUNCOM, FILCOM.

pxa = (0.,0.5)
pya = (0.,0.5)
n = 2

TEST: #SR 1 5 7
      "If error handling mode is ON, and no structure is open, then
       <polyline> should return error number, function identifier, and
       error file to the user defined error handler."
<set error handling mode> to ON
errcom = 999
funcom = 999
filcom = 999
set errctl to ON
<polyline>
set errctl to OFF
pass/fail depending on (errcom = 5 and funcom = <polyline> and
                        filcom = ERRFIL)

TEST: #SR 1 10
      "If error handling mode is OFF, and no structure is open, then
       <polyline> should not return error number, function identifier
       and error file to the user defined error handler."

<set error handling mode> to OFF
errcom = 999
funcom = 999
filcom = 999
set errctl to ON
<polyline>
set errctl to OFF
pass/fail depending on (errcom = 999 and funcom = 999 and filcom = 999)

END PROGRAM 2