From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 18 Sep 92 01:38:05 GMT From: dog.ee.lbl.gov!hellgate.utah.edu!cascades.utah.edu!matwood@ucbvax.Berkele y.EDU (Mark Atwood) Subject: Weird Exception Problem Message-ID: <1992Sep17.193806.21550@hellgate.utah.edu> List-Id: I am still learning Ada (the hard way) and have encountered a weird problem. I don't know if its a compiler problem or if It's Supposed To Do That". We have a moderatly large (14 KLOC) Ada program on an HP controller (pretty much a HP9000/300 type thing) and we're using Alsys Ada 5.5.0. I seems to be impossible to talk to a real live non-saleperson there. We're controlling a piece of equipment via an HPIB IEEE-488 bus. If the equipment or the HPIB cable goes down, we have set it up to raise a TEXT_IO.DEVICE_ERROR. This works great, most of the time. In one package, if an exception is raised, we get a PROGRAM_ERROR with no hints. No stack trace, no exec history, no line numbers, no reason given, and whats worse -- we cannot trap it in a handler. I've intentintionally caused exceptions in this part of the code, and got the same behavior. This code isnt any different in any way that I can tell from other parts of this program, where the exception handling works great. I tried reading the LRM and it doesnt help much. It says that a PROGRAM_ERROR can be raised if I try using something before its been "elaborated". I guess its a good yardstick of the depth of my Ada understanding that I still dont know what "elaboration" really is, even after reading the LRM. Also, if an exception is raised in a "library unit" the program will abort. Once again, I couldn't figure out what a "library unit" is. All this stuff seems to be in LRM section 10. Can anyone help me out? --- Mark Atwood :: DOD-STD-2167A and DOD-STD-1815A matwood@peruvian.utah.edu :: All who understand, I smile with you. The University has enough problems without being blamed for mine.