From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_40,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4e3bf9c34cd5c9b4,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-25 12:34:35 PST Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!ctcvax.ccf.swri.edu!trident!tim Newsgroups: comp.lang.ada Subject: Alsys DOS question Message-ID: <323@trident.datasys.swri.edu> From: tim@trident.datasys.swri.edu (Timothy J. Barton) Date: 25 Mar 93 20:34:35 GMT Organization: Southwest Research Institute Summary: How to trap critical error? Date: 1993-03-25T20:34:35+00:00 List-Id: 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