HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 6 249
USING VPLUS INTRINSICS
ERROR HANDLING
particular field errors. Error messages may be general VPLUS messages (see Appendix B),
or custom messages specified during forms design with FORMSPEC. In either case, the
message is returned to the calling program by VERRMSG. VERRMSG determines the type of
the error by examining
cstatus
and
numerrs
. If
cstatus
is not zero, its value indicates a
particular intrinsic call error. If
cstatus
is zero and
numerrs
is set, VERRMSG knows the
error is an editing error and uses internal values to locate the error in the error message
file. If an editing error is detected by a user routine, the program must provide its own
message when it calls VSETERROR to set the error flag for the field.
Determining Fields in Error
VGETFORMINFO provides a method of determining which fields are flagged in error by the
editing routines. VFIELDEDITS sets an error flag for each field that failed edit checks. Only
the error number of the first field in error and the number of errors have been returned to
an application by VFIELDEDITS via the
comarea
. All fields in error are enhanced with the
error enhancement if VSHOWFORM is called after VFIELDEDITS. To enable applications to
determine which fields are in error for a given form at run-time, VGETFORMINFO optionally
returns data about these error flags to show which fields failed the edit checks.