From: tim@trident.datasys.swri.edu (Timothy J. Barton)
Subject: Alsys DOS question
Date: 25 Mar 93 20:34:35 GMT
Date: 1993-03-25T20:34:35+00:00 [thread overview]
Message-ID: <323@trident.datasys.swri.edu> (raw)
Howdy. I am writing an Ada application using the Alsys ver. 5.1 DOS 32-bit
compiler. I need to catch DOS "critical I/O errors" so the infamous
"Abort, Retry, Ignore, Fail" message doesn't blast itself into the middle of
my pretty application when the user tries to print to a nonexistent LPT2.
I have a routine that opens the hardware port, and I think I have made the
proper calls to catch the critical I/O error, but I have been unable to
stop the message from going to the screen.
Thanks for everyone's suggestions to my previous exception handler question.
Special thanks to the guys (and gals) from Verdix.
Any suggestions? Code looks like the following:
-------------------------------------------------------------------------
function OpenPrinter return BOOLEAN is
begin
DOSE.Critical_Error_Set; -- Should install INT24 handler
OPEN( FILE => prnFile,
MODE => OUT_FILE,
NAME => "lpt2" );
DOSE.Critical_Error_Reset; -- Should restore default INT24 handler
return TRUE;
exception
when others => DOSE.Critical_Error_Reset;
return FALSE;
end OpenPrinter;
----------------------------------------------------------------------------
Timothy J. Barton tim@trident.datasys.swri.edu
Senior Research Analyst (210) 522-3540
Southwest Research Institute (SwRI) (210) 522-5499 (Fax)
San Antonio, Texas 78228-0510
reply other threads:[~1993-03-25 20:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox