Dec 182017
Quick Basic 4.5 error handling routines. Full source included.
File QB45ERR.ZIP from The Programmer’s Corner in
Category BASIC Language
Quick Basic 4.5 error handling routines. Full source included.
File Name File Size Zip Size Zip Type
QB45ERR.BAS 6535 1783 deflated
QB45ERR.DOC 1922 880 deflated
QB45MSG.TXT 2656 1221 deflated
TPCREAD.ME 199 165 deflated

Download File QB45ERR.ZIP Here

Contents of the QB45ERR.DOC file

** Quick Basic Version 4.5 Error Handler Routines **

These are a couple of subroutines that I'm using in a Multiple

Module proprietary program to "internalize" the Standard error mes-

sages, and make it possible to recover from internal program errors

without terminating the program.

They also trap out "Offline" and "Paper out" conditions on LPT1 &

LPT2, and display an error message for these conditions on line 25 of

the current screen. The Var's lneprt1 & lneprt2 are used as flags to

indicate whether their respective printers are available for use. Note

that the Error Handler will set these flags to False if it detects an

Offline or Out of Paper condition on the associated printer. Your

program needs to include a way for the user to set the appropriate

flag true again after the printer fault has been corrected.

The Main Error Handler Subroutine also has the ability to display

ten "Custom" error messages, which can be generated from within the

program by the appropriate code, such as:

IF Stuff > 10 then ERROR 200

The Error Message for code 200 Would be "Too Much Stuff" .

Also note that these Custom Error Messages can be extended out to

code 255 by adding the appropriate CASE Statements.

The Error Handler displays its messages on screen # 3 to avoid

trashing the program's current working screen. The cscrn% and vscrn%

var's point to the program's current working screen (Normally # 0).

This allows the use of screens 0, 1, & 2 on a CGA, and 0, 1, 2, 4, 5,

6, & 7 on an EGA.

The Routines can be modified to use a window if you are using one

of the window generating packages in your application.

 December 18, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>