Design: 09.01.10.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: Error 2001 handled by user

CHARACTERISTICS: nnnn

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  *** *** ***

<open structure> 100
<text>
<execute structure> 101
<execute structure> 102
<close structure>

<open structure> 101
<text>
<execute structure> 102
<close structure>

<open structure> 102
<text>
<closet structure>

<open archive file> 11
<archive all strucutures> 11

<retrieve structure identifiers> with size of output list = 2: signals error
<retrieve paths to ancestors> with size of path buffer = 1: signals error
<retrieve paths to descendants> with size of path buffer = 1: signals error

<close archive file> 11

*** *** ***  Results of user-defined error handling  *** *** ***

TEST: #SR 2
      "If <retrieve structure identifiers> is called and output
       parameter size is insufficient, it should return error code
       2001, function identifier 120, 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 2
      "If <retrieve paths to ancestors> is called and output parameter
       size is insufficient, it should return error code 2001,
       function identifier 124, 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 2
      "If <retrieve paths to descendants> is called and output
       parameter size is insufficient, it should return error code
       2001, function identifier 125, 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 2